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

RDISCROWD-7895 custom error messages #1043

Merged
merged 3 commits into from
Feb 20, 2025
Merged

RDISCROWD-7895 custom error messages #1043

merged 3 commits into from
Feb 20, 2025

Conversation

n00rsy
Copy link

@n00rsy n00rsy commented Feb 18, 2025

Issue number of the reported bug or feature request: RDISCROWD-7895

Describe your changes

  • support custom error messages in abort() calls
  • Many methods already assume that this works and pass strings to abort, like abort(400, "my custom message"). Now these will actually get sent to the user and will be helpful when they are working with our API.

Some usage examples:

  1. https://github.com/bloomberg/pybossa/blob/main/pybossa/api/__init__.py#L795
  2. https://github.com/bloomberg/pybossa/blob/main/pybossa/api/__init__.py#L733
  3. https://github.com/bloomberg/pybossa/blob/main/pybossa/api/__init__.py#L772

Testing performed
Tested locally

Additional context
Add any other context about your contribution here.

@n00rsy n00rsy merged commit ba4d9dc into main Feb 20, 2025
5 checks passed
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 this pull request may close these issues.

2 participants