#316: further improving BSoD logging

This commit is contained in:
SleepWalker 2017-03-30 08:37:36 +03:00
parent 40259ddbc4
commit 4e03e48e02

View File

@ -10,7 +10,15 @@ export default function BsodMiddleware(dispatchBsod, logger) {
) { ) {
dispatchBsod(); dispatchBsod();
logger.warn('Unexpected response (BSoD)', {resp}); if (!resp.message || !/NetworkError/.test(resp.message)) {
let message = 'Unexpected response (BSoD)';
if (resp.message) {
message = `BSoD: ${resp.message}`;
}
logger.warn(message, {resp});
}
} }
return Promise.reject(resp); return Promise.reject(resp);