Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityError should be exposed #631

Open
luke-coastpay-com opened this issue Dec 3, 2024 · 3 comments
Open

SecurityError should be exposed #631

luke-coastpay-com opened this issue Dec 3, 2024 · 3 comments

Comments

@luke-coastpay-com
Copy link

Tl;dr: SecurityError should be exported from the package

Howdy!

My SecurityHandler will throw different errors based on what went wrong, and I'd like to be able to access SecurityError.errors in my ErrorHandler. Since the ErrorHandler does not know which variety of error it is handling, I'd like to be able to check whether a given error is an instance of a SecurityError thrown by fastify-openapi-glue before attempting to access properties of SecurityError.

Currently, SecurityError is exported from securityHandler.js, but is not exported from the package, so I cannot access it in my code. It would be great if this error could be exported from the package.

Thanks!

@seriousme
Copy link
Owner

Hi,

thanks for asking.
I will add it to the exports.

Kind regards,
Hans

@luke-coastpay-com
Copy link
Author

Thanks!

@seriousme
Copy link
Owner

Published as v4.8.0 on NPM, enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants