oauth2orize icon indicating copy to clipboard operation
oauth2orize copied to clipboard

Export `ForbiddenError`

Open kurakin-oleksandr opened this issue 9 years ago • 2 comments
trafficstars

How about export ForbiddenError? I need it inside my custom session storage

kurakin-oleksandr avatar May 31 '16 15:05 kurakin-oleksandr

Can you explain why you need it? Would checking status == 403 be sufficient?

jaredhanson avatar May 31 '16 18:05 jaredhanson

I've implemented my custom session storage and added check similar to https://github.com/jaredhanson/oauth2orize/blob/master/lib/txn/session.js#L27

To throw same error I need to re-use ForbiddenError class or implement my own. As for me it makes sense to export ForbiddenError as it is done for TokenError, OAuth2Error and AuthorizationError.

kurakin-oleksandr avatar May 31 '16 19:05 kurakin-oleksandr