fastify / fastify/fastify-auth
Add an option to easily customize error handling
- Dominant language
- JavaScript
- Stars
- 380
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
### Prerequisites
- [x] I have written a descriptive issue title
- [x] I have searched existing issues to ensure the feature has not already been requested
### 🚀 Feature Proposal
`@fastify/auth` currently just passes through the error from the underlying function, it would be useful to have a function to easily customize the error response returned as a result specifically for this plugin (Rather then global fastify errors).
### Motivation
For example, this can be used to add `WWW-Authenticate` headers
### Example
_No response_
Contributor guide
Research direction
Start at the @fastify/auth plugin entry point and trace how errors from the underlying function are currently passed through. Review the plugin's existing tests, then clarify the option's API and verify that it customizes this plugin's response, including headers such as WWW-Authenticate, without changing global Fastify errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100