diff --git a/packages/client/src/api/api.js b/packages/client/src/api/api.js index 1e73baf602..a88398ed3a 100644 --- a/packages/client/src/api/api.js +++ b/packages/client/src/api/api.js @@ -1,6 +1,7 @@ /** * API cache for cached request responses. */ +import { notificationStore } from "../store/notification" let cache = {} /** @@ -35,10 +36,12 @@ const makeApiCall = async ({ method, url, body, json = true }) => { case 200: return response.json() case 404: + notificationStore.danger("Not found") return handleError(`${url}: Not Found`) case 400: return handleError(`${url}: Bad Request`) case 403: + notificationStore.danger("Forbidden") return handleError(`${url}: Forbidden`) default: if (response.status >= 200 && response.status < 400) { diff --git a/packages/client/src/api/queries.js b/packages/client/src/api/queries.js index 27c2d2f5ab..dd9996b25a 100644 --- a/packages/client/src/api/queries.js +++ b/packages/client/src/api/queries.js @@ -1,3 +1,4 @@ +import { notificationStore } from "../store/notification" import API from "./api" /**