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
As discussed briefly in #1429, calls to request(options, callback) shall never throw an error as this is not a recommended error handling pattern. If a function return an error asynchronously, then all the errors including those can be identified right away, shall be returned asynchronously.
varoptions={url: url,method: 'HEAD',body: 'Some data'}request(options,function(err,response,body){// never called})// throws an error instead
For a more detailed discussion on the matter, please refer to Error Handling in Node.js, section "Throw, Callback, or EventEmitter?".
Please consider updating the error handling to always call the provided callback instead of throwing errors.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As discussed briefly in #1429, calls to
request(options, callback)
shall never throw an error as this is not a recommended error handling pattern. If a function return an error asynchronously, then all the errors including those can be identified right away, shall be returned asynchronously.For a more detailed discussion on the matter, please refer to Error Handling in Node.js, section "Throw, Callback, or EventEmitter?".
Please consider updating the error handling to always call the provided callback instead of throwing errors.
The text was updated successfully, but these errors were encountered: