You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since bones API endpoints error returns are standardized to return a hash containing a message and a status property, should we decode these hashes in Admin.bones' error function?.
Something like:
error: function(model, resp) {
var message = resp;
if (resp instanceof Object && resp.responseText) {
var obj = JSON.parse(resp.responseText);
if (obj.message) {
message = obj.message
}
}
new views['AdminGrowl']({
message: message,
classes: 'error',
autoclose: 0
});
}
The text was updated successfully, but these errors were encountered:
Since bones API endpoints error returns are standardized to return a hash containing a
message
and astatus
property, should we decode these hashes in Admin.bones' error function?.Something like:
The text was updated successfully, but these errors were encountered: