## What * Configure authorized endpoints to return **more specific error responses** when a token is invalid. * Distinguish between cases such as: * Token expired * Token malformed/invalid * Token missing ## Why * The frontend needs clearer feedback to handle authentication errors properly. * Improves user experience (e.g., prompting re-login vs. showing an error). * Helps with debugging and logging. ## Acceptance Criteria * [ ] Endpoints return `401 Unauthorized` with a clear error code/message when the token is expired. * [ ] Endpoints return a distinct error when the token is malformed/invalid. * [ ] Endpoints return a distinct error when the token is missing. * [ ] Documentation updated with the possible error responses and their meanings.
What
Configure authorized endpoints to return more specific error responses when a token is invalid.
Distinguish between cases such as:
Why
Acceptance Criteria
401 Unauthorizedwith a clear error code/message when the token is expired.