.replace(/,/g, '.').toString().replace(/\s+/g, '')
export default async (e, action) => {
try {
if (PROJECT_ENV !== 'debug') {
await orders.error({
message: e.message,
stack: e.stack,
userAgent: navigator.userAgent, //отлов юзерагента
action
});
console.log('The error information was sent to the server');
} else {
console.error(e);
}
} catch (error) {
console.error('Failed to send error information to server');
}
return {
type: ERROR,
error: e
};
};
export default async (e, action) => {
try {
if (PROJECT_ENV !== 'debug') {
await orders.error({
message: e.message,
stack: e.stack,
action
});
console.log('The error information was sent to the server');
} else {
console.error(e);
}
} catch (error) {
console.error('Failed to send error information to server');
}
return {
type: ERROR,
error: e
};
};
{
"message": "@autobind decorator can only be applied to methods not: undefined",
"stack": "Error: @autobind decorator can only be applied to methods not: undefined\n at a (http://<url домена>/widget/media/orders.js:2:1359)\n at r (http://<url домена>/widget/media/orders.js:2:820)\n at f._constructComponentWithoutOwner (http://<url домена>/widget/media/index.js:2:243223)\n at f._constructComponent (http://<url домена>/widget/media/index.js:2:243077)\n at f.mountComponent (http://<url домена>/widget/media/index.js:2:242259)\n at Object.mountComponent (http://<url домена>/widget/media/index.js:2:31349)\n at Object.updateChildren (http://<url домена>/widget/media/index.js:2:240750)\n at v._reconcilerUpdateChildren (http://<url домена>/widget/media/index.js:2:238520)\n at v._updateChildren (http://<url домена>/widget/media/index.js:2:239269)\n at v.updateChildren (http://<url домена>/widget/media/index.js:2:239167)"
}
export const getPdfConfig = axios.create({
...httpConfig,
responseType: 'blob',
headers: {
...customHeaders,
'Content-Type': 'application/pdf',
},
}).get;