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

Meaningful HTTP Producer responses #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

youwe-petervanderwal
Copy link
Contributor

Background:
When a HTTP Producer parses incoming JSON (for example) the request shouldn't return a 200 OK with message "Successfully scheduled 0 job(s) to be queued." when the sent JSON is invalid and couldn't be parsed. Instead, you want to be able to send an 400 Bad Request with a message like "Request body didn't contain a valid JSON array on key 'jobs'".

Commit:

  • Let the HTTP Producer return with 500 Internal Server error if not (all) jobs could be queued
  • Allow option to override response code and message for user exceptions

- Let the HTTP Producer return with 500 Internal Server error if not (all) jobs could be queued
- Allow option to override response code and message for user exceptions
The Combination PHP <7.4 and maglnet/composer-require-checker doesn't work with Composer 2. User Composer version 1 for PHP 7.2 and 7.3.
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.

1 participant