Page Contents

Home > @loopback/authorization > AuthorizationError

AuthorizationError class

The custom error class that describes the error thrown by the authorization module. Should be extracted to the common layer shared by authentication and authorization.

Signature:

export declare class AuthorizationError extends Error 

Extends: Error

Properties

Property Modifiers Type Description
[code?](/doc/en/lb4/apidocs.authorization.authorizationerror.code.html) string _(Optional)_ Machine readable code, can be understood by any clients
[statusCode?](/doc/en/lb4/apidocs.authorization.authorizationerror.statuscode.html) number _(Optional)_ The status code for HTTP requests