mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Standardise API error response format
This commit is contained in:
@@ -148,7 +148,7 @@ RED.deploy = (function() {
|
||||
}).fail(function(xhr,textStatus,err) {
|
||||
RED.nodes.dirty(true);
|
||||
if (xhr.responseText) {
|
||||
RED.notify("<strong>Error</strong>: "+xhr.responseText,"error");
|
||||
RED.notify("<strong>Error</strong>: "+xhr.responseJSON.message,"error");
|
||||
} else {
|
||||
RED.notify("<strong>Error</strong>: no response from server","error");
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ RED.library = (function() {
|
||||
}).done(function(data,textStatus,xhr) {
|
||||
RED.notify("Saved "+options.type,"success");
|
||||
}).fail(function(xhr,textStatus,err) {
|
||||
RED.notify("Saved failed: "+xhr.responseText,"error");
|
||||
RED.notify("Saved failed: "+xhr.responseJSON.message,"error");
|
||||
});
|
||||
}
|
||||
$( "#node-dialog-library-save-confirm" ).dialog({
|
||||
|
||||
Reference in New Issue
Block a user