client/middlewares/normalizeErrorMiddleware.js
Consider simplifying this complex logical expression. Open
Open
if (action && action.type.endsWith('_REJECTED') && action.payload) {
// Try to get the default error message from the response.
let message = action.payload.statusText || action.payload.status || 'Unknown Server Error';
const status = (action.payload.response && action.payload.response.status) || 500;