cartodb-4.42/lib/assets/javascripts/dashboard/helpers/response-parser.js

11 lines
303 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
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;
};