[ML] Displaying JSON parsing errors when importing (#27577)

This commit is contained in:
James Gowdy 2018-12-21 14:54:01 +00:00 committed by GitHub
parent 074a42749b
commit 0923a469f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,11 @@ function toString(error) {
errorObj.more = error.error.response;
}
return errorObj;
}
if (error.error.message !== undefined) {
// this will catch javascript errors such as JSON parsing issues
return { msg: error.error.message };
}
} else {
return { msg: error.error };