Compare commits

..

1 Commits

Author SHA1 Message Date
Ashwin Bhatkal
b771353c37 chore: remove tsc2 check from jsci 2026-03-09 10:59:26 +05:30
5 changed files with 10 additions and 33 deletions

View File

@@ -13,23 +13,6 @@ on:
jobs:
tsc:
if: |
github.event_name == 'merge_group' ||
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v5
with:
node-version: "22"
- name: install
run: cd frontend && yarn install
- name: tsc
run: cd frontend && yarn tsc
tsc2:
if: |
github.event_name == 'merge_group' ||
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||

View File

@@ -33,8 +33,6 @@ import { ALL_TIME_ZONES } from 'utils/timeZoneUtil';
import 'dayjs/locale/en';
import { SOMETHING_WENT_WRONG } from '../../constants/api';
import { showErrorNotification } from '../../utils/error';
import { AlertRuleTags } from './PlannedDowntimeList';
import {
createEditDowntimeSchedule,
@@ -177,14 +175,14 @@ export function PlannedDowntimeForm(
} else {
notifications.error({
message: 'Error',
description:
typeof response.error === 'string'
? response.error
: response.error?.message || SOMETHING_WENT_WRONG,
description: response.error || 'unexpected_error',
});
}
} catch (e: unknown) {
showErrorNotification(notifications, e as Error);
} catch (e) {
notifications.error({
message: 'Error',
description: 'unexpected_error',
});
}
setSaveLoading(false);
},

View File

@@ -25,7 +25,6 @@ import { CalendarClock, PenLine, Trash2 } from 'lucide-react';
import { useAppContext } from 'providers/App/App';
import { USER_ROLES } from 'types/roles';
import { showErrorNotification } from '../../utils/error';
import {
formatDateTime,
getAlertOptionsFromIds,
@@ -360,7 +359,7 @@ export function PlannedDowntimeList({
useEffect(() => {
if (downtimeSchedules.isError) {
showErrorNotification(notifications, downtimeSchedules.error);
notifications.error(downtimeSchedules.error);
}
}, [downtimeSchedules.error, downtimeSchedules.isError, notifications]);

View File

@@ -137,10 +137,7 @@ export const deleteDowntimeHandler = ({
export const createEditDowntimeSchedule = async (
props: DowntimeScheduleUpdatePayload,
): Promise<
| SuccessResponse<PayloadProps>
| ErrorResponse<{ code: string; message: string } | string>
> => {
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
if (props.id) {
return updateDowntimeSchedule({ ...props });
}

View File

@@ -3,10 +3,10 @@ import { ErrorStatusCode, SuccessStatusCode } from 'types/common';
export type ApiResponse<T> = { data: T };
export interface ErrorResponse<ErrorObject = string> {
export interface ErrorResponse {
statusCode: ErrorStatusCode;
payload: null;
error: ErrorObject;
error: string;
message: string | null;
body?: string | null;
}