cartodb-4.29/lib/assets/javascripts/dashboard/helpers/response-parser.js
2020-06-15 10:58:47 +08:00

11 lines
303 B
JavaScript

module.exports = function (response) {
const responseJSON = response && response.responseJSON;
let errors = responseJSON && responseJSON.message;
if (responseJSON && responseJSON.errors && responseJSON.errors.length) {
errors = responseJSON.errors.join('. ') + '. ';
}
return errors;
};