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 how responses from receivers are returned via the controller #255

Open
3 tasks
akeemphilbert opened this issue Mar 11, 2023 · 0 comments
Open
3 tasks

Comments

@akeemphilbert
Copy link
Contributor

The response returned by a receiver should be used to determine the type of response returned via the controller

🚀 Why this matters

  • The DefaultWriteController is used when a x-command is set and there are time when non JSON responses should be returned
  • There are times when specific response codes need to be returned

✨ Features

  • Use the response type to determine the content type of the response
  • Allow for response codes to be returned with errors
  • Fix issue where if the error not a domain error, a parse error occurs

🔑 Tips

  • We don't want the receiver (in the domain) to have to return http responses (that happens in a different layer)

❓Questions

✔️ Tasks

akeemphilbert added a commit that referenced this issue Mar 11, 2023
…nses are handled by the controller

* Removed the check on the error type since this could be done in the HTTPErrorHandler that is set by the specific api
* Made it so that if the response is a string, the string response type is set instead
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

1 participant