From 3add10ccbed861b14efe443fe67a53b55b61af09 Mon Sep 17 00:00:00 2001 From: olav Date: Thu, 9 Jun 2022 15:36:01 +0200 Subject: [PATCH 1/2] refactor: simplify error toast text (#1081) * refactor: simplify error toast text * refactor: simplify 404 error text --- frontend/src/hooks/useToast.tsx | 4 ++-- frontend/src/utils/apiUtils.ts | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) 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; } From 63852441dd311a93ff9a4809f457d55f56eecb89 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 9 Jun 2022 15:10:46 +0000 Subject: [PATCH 2/2] chore(deps): update dependency sass to v1.52.3 --- frontend/package.json | 2 +- frontend/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index b97a5c574c..d4ac9a73cf 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -89,7 +89,7 @@ "react-table": "7.8.0", "react-test-renderer": "17.0.2", "react-timeago": "6.2.1", - "sass": "1.52.2", + "sass": "1.52.3", "semver": "7.3.7", "swr": "1.3.0", "tss-react": "3.7.0", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 6f1303242f..3561cb4ab8 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -5451,10 +5451,10 @@ safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass@1.52.2: - version "1.52.2" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.52.2.tgz#cd1f03e0e7be5bb2cebcf1c34d735f087d790936" - integrity sha512-mfHB2VSeFS7sZlPv9YohB9GB7yWIgQNTGniQwfQ04EoQN0wsQEv7SwpCwy/x48Af+Z3vDeFXz+iuXM3HK/phZQ== +sass@1.52.3: + version "1.52.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.52.3.tgz#b7cc7ffea2341ccc9a0c4fd372bf1b3f9be1b6cb" + integrity sha512-LNNPJ9lafx+j1ArtA7GyEJm9eawXN8KlA1+5dF6IZyoONg1Tyo/g+muOsENWJH/2Q1FHbbV4UwliU0cXMa/VIA== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0"