useApi fix
parent
c7576a08c2
commit
c4ae08f558
|
@ -9,7 +9,7 @@ const useApi = () => {
|
||||||
|
|
||||||
const handleError = err => {
|
const handleError = err => {
|
||||||
let message;
|
let message;
|
||||||
switch (err.response.status) {
|
switch (err.response?.status) {
|
||||||
case 500:
|
case 500:
|
||||||
message = err.response.statusText;
|
message = err.response.statusText;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue