diff --git a/frontend/src/hooks/useToast.tsx b/frontend/src/hooks/useToast.tsx index feb09480e3..f9bf8fcc5f 100644 --- a/frontend/src/hooks/useToast.tsx +++ b/frontend/src/hooks/useToast.tsx @@ -12,10 +12,10 @@ const useToast = () => { })); const setToastApiError = useCallback( - (errorText: string, overrides?: IToast) => { + (text: string, overrides?: IToast) => { setToast({ title: 'Something went wrong', - text: `We had trouble talking to our API. Here's why: ${errorText}`, + text, type: 'error', show: true, autoHideDuration: 12000, diff --git a/frontend/src/utils/apiUtils.ts b/frontend/src/utils/apiUtils.ts index 9155cf69c3..c0c7c8321d 100644 --- a/frontend/src/utils/apiUtils.ts +++ b/frontend/src/utils/apiUtils.ts @@ -51,9 +51,7 @@ export class NotFoundError extends Error { statusCode: number; constructor(statusCode: number = NOT_FOUND) { - super( - 'The requested resource could not be found but may be available in the future' - ); + super('The requested resource could not be found.'); this.name = 'NotFoundError'; this.statusCode = statusCode; }