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

Provide Suggestive Hint for Pluralized Endpoint Errors #173

Open
gitfrosh opened this issue Nov 8, 2024 · 0 comments
Open

Provide Suggestive Hint for Pluralized Endpoint Errors #173

gitfrosh opened this issue Nov 8, 2024 · 0 comments
Assignees

Comments

@gitfrosh
Copy link
Owner

gitfrosh commented Nov 8, 2024

In our app insights, I’ve noticed that API users frequently use the plural form of our endpoints, such as /quotes instead of the correct singular form, /quote. This results in a 404 error with a response like:

{
    "success": false,
    "message": "Not found."
}

To enhance the developer experience, we could include a helpful hint in the error response. For instance, if a plural endpoint is requested, we could respond with a message suggesting the correct singular form. This would make it easier for users to identify and correct the issue without extensive troubleshooting.

{
    "success": false,
    "message": "Not found. Did you mean to use the singular version of the endpoint, `/quote`?"
}
@MateuszKikmunter MateuszKikmunter self-assigned this Dec 17, 2024
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