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

Improve error message for invalid version #88068

Closed
szokeasaurusrex opened this issue Mar 27, 2025 · 1 comment · Fixed by #88905
Closed

Improve error message for invalid version #88068

szokeasaurusrex opened this issue Mar 27, 2025 · 1 comment · Fixed by #88905
Assignees

Comments

@szokeasaurusrex
Copy link
Member

The OrganizationArtifactbundleAssemble endpoint performs validation on the version string:

"version": {"type": "string", "pattern": "^[^/]+$"},

If the provided version fails the validation (for example, in the case where the version is an empty string), the endpoint returns a 400 status with the message '' does not match '^[^/]+$'.

This message should be improved. In its current state, the error message is vague since it does not mention which field failed validation. It would also likely be better if we provided human-readable information rather than just a regex. A better error message could look like the following:

The provided version '' is invalid. Versions cannot be empty and cannot contain any "/" characters.

The better error message would have avoided confusion in getsentry/sentry-cli#2385.

@szokeasaurusrex
Copy link
Member Author

@iambriccardo I assigned you since your team owns this endpoint and it looks like you've edited this file recently – feel free to assign to someone else if they'd be more able to help.

I can also do this, might take me more time though since I would have to figure out where to make the change.

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

Successfully merging a pull request may close this issue.

2 participants