PassageError Class
Understand the errors thrown by Passage.js
Definition
Passage.js provides a custom error class that is used to manage all errors in the library. The PassageError
class consists of the following attributes.
Attribute | Description |
---|---|
| The HTTP status code returned from the API |
| Text representation of the status code (e.g. "Bad Request") |
| Informative message describing the specific error that occurred. |
Catching Passage Errors
Import the PassageError
class from @passageidentity/passage-js
package.
Then you can catch errors in your frontend application like this.
Last updated