diff --git a/app/client/src/constants/errors.ts b/app/client/src/constants/errors.ts index eccd1a9a80..e7b8e60938 100644 --- a/app/client/src/constants/errors.ts +++ b/app/client/src/constants/errors.ts @@ -1,15 +1,3 @@ export const DEFAULT_ERROR_MESSAGE = "There was an error"; export const DEFAULT_ACTION_ERROR = (action: string) => `Incurred an error when ${action}`; - -export const API_ERROR_CODES = [ - 1000, - 4000, - 4001, - 4002, - 4003, - 4004, - 4006, - 5000, - 5001, -]; diff --git a/app/client/src/editorComponents/ToastComponent.tsx b/app/client/src/editorComponents/ToastComponent.tsx index 27f47d9d4e..9376e93940 100644 --- a/app/client/src/editorComponents/ToastComponent.tsx +++ b/app/client/src/editorComponents/ToastComponent.tsx @@ -3,6 +3,5 @@ import { Position, Toaster } from "@blueprintjs/core"; // To add a toast import this instance and call .show() // https://blueprintjs.com/docs/#core/components/toast.example export default Toaster.create({ - className: "toaster", position: Position.BOTTOM_RIGHT, }); diff --git a/app/client/src/sagas/ErrorSagas.tsx b/app/client/src/sagas/ErrorSagas.tsx index 832f7b0706..4f66de37a6 100644 --- a/app/client/src/sagas/ErrorSagas.tsx +++ b/app/client/src/sagas/ErrorSagas.tsx @@ -27,10 +27,10 @@ export function* validateResponse(response: ApiResponse) { } } -type IError = object | { message: string }; +type ErrorPayloadType = object | { message: string }; const ActionErrorDisplayMap: { - [key: string]: (error: IError) => string; + [key: string]: (error: ErrorPayloadType) => string; } = { [ReduxActionErrorTypes.API_ERROR]: error => _.get(error, "message", DEFAULT_ERROR_MESSAGE), @@ -42,7 +42,9 @@ const ActionErrorDisplayMap: { [ReduxActionErrorTypes.WIDGET_OPERATION_ERROR]: () => DEFAULT_ERROR_MESSAGE, }; -export function* errorSaga(errorAction: ReduxAction<{ error: IError }>) { +export function* errorSaga( + errorAction: ReduxAction<{ error: ErrorPayloadType }>, +) { // Just a pass through for now. // Add procedures to customize errors here console.log({ error: errorAction });