handle errors
This commit is contained in:
parent
e2b6272c71
commit
a3c276a3e0
@ -21,7 +21,7 @@ import { RoutesReceivedContext
|
|||||||
from 'app/context/routes';
|
from 'app/context/routes';
|
||||||
import { ApiStatusProvider }
|
import { ApiStatusProvider }
|
||||||
from 'app/context/api-status';
|
from 'app/context/api-status';
|
||||||
import { useErrorHandler }
|
import { useErrorHandler, isTimeoutError }
|
||||||
from 'app/context/errors';
|
from 'app/context/errors';
|
||||||
import { useQuery
|
import { useQuery
|
||||||
, PARAM_QUERY
|
, PARAM_QUERY
|
||||||
@ -166,7 +166,12 @@ const useSearchResults = ({
|
|||||||
loading: false,
|
loading: false,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
handleError(error);
|
|
||||||
|
// We handle timeout errors ourself. All other errors
|
||||||
|
// are handled by the global error handler.
|
||||||
|
if(!isTimeoutError(error)) {
|
||||||
|
handleError(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}, [searchUrl, setState, handleError]);
|
}, [searchUrl, setState, handleError]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user