← Back To API Reference


.reason() -> any

Get the rejection reason of this promise. Throws an error if the promise isn't rejected - it is a bug to call this method on an unrejected promise.

You should check if this promise is .isRejected() in code paths where it's guaranteed that this promise is rejected.