mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-29 00:10:54 +05:30
#316: further improving BSoD logging
This commit is contained in:
parent
40259ddbc4
commit
4e03e48e02
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user