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

fix: add http error responses #494

Merged
merged 2 commits into from
Feb 2, 2025
Merged

fix: add http error responses #494

merged 2 commits into from
Feb 2, 2025

Conversation

acouvreur
Copy link
Member

@acouvreur acouvreur commented Feb 2, 2025

This features adds rfc7807 Problem detail responses when an error happens processing a request.

This will greatly improve the common issues with "blank pages|=" and "404 pages" issues which should now properly tell the user what input was wrong (group that does not exist, container name that does not exist, etc.)

Example of requesting a non existing group:

{
    "availableGroups": [
        "mimic"
    ],
    "detail": "The group you requested does not exist. It is possible that the group has not been scanned yet.",
    "error": "group mimicc not found",
    "instance": "/api/strategies/blocking?group=mimicc\u0026session_duration=10s",
    "requestGroup": "mimicc",
    "status": 404,
    "title": "Group not found",
    "type": "https://sablierapp.dev/#/errors?id=group-not-found"
}

This features adds rfc7807 Problem detail responses when an error happens processing a request.

This will greatly improve the common issues  with "blank pages|=" and "404 pages" issues which should now properly tell the user what input was wrong (group that does not exist, container name that does not exist, etc.)
@acouvreur acouvreur merged commit 00cc153 into main Feb 2, 2025
20 checks passed
@acouvreur
Copy link
Member Author

🎉 This PR is included in version 1.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant