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
|
- Add explanation to the help text on the new feature to build query string from msg.payload #2116
|
||||||
- Bump bcrypt to latest
|
- Bump bcrypt to latest
|
||||||
- Add Korean locales files for nodes #2100
|
- Add Korean locales files for nodes #2100
|
||||||
|
- Add error message if catalog is invalid json
|
||||||
|
|
||||||
#### 0.20.3: Maintenance Release
|
#### 0.20.3: Maintenance Release
|
||||||
|
|
||||||
|
@ -382,9 +382,20 @@ RED.palette.editor = (function() {
|
|||||||
catalogueLoadStart = Date.now();
|
catalogueLoadStart = Date.now();
|
||||||
var handled = 0;
|
var handled = 0;
|
||||||
catalogues.forEach(function(catalog,index) {
|
catalogues.forEach(function(catalog,index) {
|
||||||
$.getJSON(catalog, {_: new Date().getTime()},function(v) {
|
$.ajax({
|
||||||
handleCatalogResponse(null,catalog,index,v);
|
dataType: "json",
|
||||||
refreshNodeModuleList();
|
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) {
|
}).fail(function(jqxhr, textStatus, error) {
|
||||||
handleCatalogResponse(jqxhr,catalog,index);
|
handleCatalogResponse(jqxhr,catalog,index);
|
||||||
}).always(function() {
|
}).always(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user