mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-28 07:50:32 +05:30
Display bsod if api returns 404
This commit is contained in:
parent
4716c679b9
commit
7ab904d52a
@ -5,10 +5,10 @@ import dispatchBsod, { inject } from './dispatchBsod';
|
||||
export default function factory(store, stopLoading) {
|
||||
inject(store, stopLoading);
|
||||
|
||||
// do bsod for 500 errors
|
||||
// do bsod for 500/404 errors
|
||||
request.addMiddleware({
|
||||
catch(resp) {
|
||||
if (resp && resp.originalResponse.status === 500) {
|
||||
if (resp && [500, 404].indexOf(resp.originalResponse.status) > -1) {
|
||||
dispatchBsod();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user