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
This rule aims to ensure that Promises are only rejected with Error objects.
It is considered good practice to only pass instances of the built-in Error object to the reject() function for user-defined errors in Promises. Error objects automatically store a stack trace, which can be used to debug an error by determining where it came from. If a Promise is rejected with a non-Error value, it can be difficult to determine where the rejection occurred.
This rule aims to ensure that Promises are only rejected with
Error
objects.It is considered good practice to only pass instances of the built-in
Error
object to thereject()
function for user-defined errors in Promises.Error
objects automatically store a stack trace, which can be used to debug an error by determining where it came from. If a Promise is rejected with a non-Error
value, it can be difficult to determine where the rejection occurred.http://eslint.org/docs/rules/prefer-promise-reject-errors
Rule:
The text was updated successfully, but these errors were encountered: