mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add error message if catalog invalid json
This commit is contained in:
parent
6175fecdd8
commit
d92040b804
@ -12,6 +12,7 @@
|
||||
- Add explanation to the help text on the new feature to build query string from msg.payload #2116
|
||||
- Bump bcrypt to latest
|
||||
- Add Korean locales files for nodes #2100
|
||||
- Add error message if catalog is invalid json
|
||||
|
||||
#### 0.20.3: Maintenance Release
|
||||
|
||||
|
@ -382,9 +382,20 @@ RED.palette.editor = (function() {
|
||||
catalogueLoadStart = Date.now();
|
||||
var handled = 0;
|
||||
catalogues.forEach(function(catalog,index) {
|
||||
$.getJSON(catalog, {_: new Date().getTime()},function(v) {
|
||||
handleCatalogResponse(null,catalog,index,v);
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
url: catalog,
|
||||
data: {_: new Date().getTime()},
|
||||
success: function(v) {
|
||||
try {
|
||||
var parsed = JSON.parse(v);
|
||||
handleCatalogResponse(null,catalog,index,parsed);
|
||||
refreshNodeModuleList();
|
||||
} catch(err) {
|
||||
console.error(catalog,err.toString())
|
||||
handleCatalogResponse(err,catalog,index);
|
||||
}
|
||||
}
|
||||
}).fail(function(jqxhr, textStatus, error) {
|
||||
handleCatalogResponse(jqxhr,catalog,index);
|
||||
}).always(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user