diff --git a/src/api/useApi.js b/src/api/useApi.js index bd25d57..15eaf68 100644 --- a/src/api/useApi.js +++ b/src/api/useApi.js @@ -9,7 +9,7 @@ const useApi = () => { const handleError = err => { let message; - switch (err.response.status) { + switch (err.response?.status) { case 500: message = err.response.statusText; break;