Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
5b3e318f
Commit
5b3e318f
authored
Mar 03, 2019
by
Florent Chehab
Browse files
Now catching error 500 in frontend.
Fixes
#22
parent
ccd63b4c
Pipeline
#35794
passed with stages
in 9 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/redux/api/SmartActions.js
View file @
5b3e318f
...
...
@@ -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
)
=>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment