Display bsod if api returns 404

This commit is contained in:
SleepWalker 2016-08-02 21:48:51 +03:00
parent 4716c679b9
commit 7ab904d52a

View File

@ -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();
}