Commit 5b3e318f authored by Florent Chehab's avatar Florent Chehab

Now catching error 500 in frontend.

Fixes #22
parent ccd63b4c
Pipeline #35794 passed with stages
in 9 minutes and 32 seconds
......@@ -130,11 +130,16 @@ export default class SmartActions {
dispatch(isSavingSpecific(false));
})
.catch((e) => {
if (typeof e.json == "function") {
return e.json();
if (typeof e.json === "function") {
return e.json()
.catch((error) => {
// eslint-disable-next-line no-unused-vars
return new Promise((resolve, reject) => resolve(error));
});
} else {
// eslint-disable-next-line no-unused-vars
return new Promise(function (resolve, reject) { resolve(e); });
return new Promise((resolve, reject) => resolve(e));
}
})
.then((errorContent) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment