From 7ab904d52a3f459739e302a9489d1f21bf32f84b Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Tue, 2 Aug 2016 21:48:51 +0300 Subject: [PATCH] Display bsod if api returns 404 --- src/components/ui/bsod/factory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ui/bsod/factory.js b/src/components/ui/bsod/factory.js index df0955e..f2936ed 100644 --- a/src/components/ui/bsod/factory.js +++ b/src/components/ui/bsod/factory.js @@ -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(); }