Closed tizol closed 7 years ago
....
Expanded image with full warning 1
Expanded image with full warning 2
https://github.com/danwrong/restler
rest.get('http://google.com').on('complete', function(result) { if (result instanceof Error) { console.log('Error:', result.message); this.retry(5000); // try again after 5 sec } else { console.log(result); } });
https://github.com/petkaantonov/bluebird/issues/990
if (result.error) { const proxiedError = new Error(); proxiedError.error = result.error.error; proxiedError.detail = result.error.detail; proxiedError.status = result.error.status; reject(proxiedError); } else { resolve(result); }
complete: function(result, response){ ... }
Warning raised when API key is wrong
....
API Needs better error handling
Expanded image with full warning 1
Expanded image with full warning 2
Suggestions
https://github.com/danwrong/restler
https://github.com/petkaantonov/bluebird/issues/990
https://github.com/danwrong/restler