handle errors
This commit is contained in:
parent
e2b6272c71
commit
a3c276a3e0
@ -21,7 +21,7 @@ import { RoutesReceivedContext
|
||||
from 'app/context/routes';
|
||||
import { ApiStatusProvider }
|
||||
from 'app/context/api-status';
|
||||
import { useErrorHandler }
|
||||
import { useErrorHandler, isTimeoutError }
|
||||
from 'app/context/errors';
|
||||
import { useQuery
|
||||
, PARAM_QUERY
|
||||
@ -166,7 +166,12 @@ const useSearchResults = ({
|
||||
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]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user