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

Add method / status for 'Bad Gateway' (502) or 'Service Unavailable' (503) #45

Closed
AKlaus opened this issue May 17, 2022 · 0 comments · Fixed by #48
Closed

Add method / status for 'Bad Gateway' (502) or 'Service Unavailable' (503) #45

AKlaus opened this issue May 17, 2022 · 0 comments · Fixed by #48
Labels
enhancement New feature or request
Milestone

Comments

@AKlaus
Copy link
Owner

AKlaus commented May 17, 2022

Use-case:

  1. An infrastructure logic calls an external service that fails, so the consumer has to receive 502 'Bad Gateway' or 503 'Service Unavailable' HTTP status code (see this SO discussion on the preferred HTTP code).
  2. The library containing the infrastructure code doesn't have a dependency on Microsoft.AspNetCore.App, so returning IDomainResult would be handy.

Task

Add additional extension method along with DomainOperationStatus state:

  • ErrorServiceUnavailable that gets automatically converted to HTTP code 503 'Service Unavailable' .
@AKlaus AKlaus added the enhancement New feature or request label May 17, 2022
@AKlaus AKlaus linked a pull request May 19, 2022 that will close this issue
@AKlaus AKlaus added this to the v2.1.0 milestone May 23, 2022
@AKlaus AKlaus closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant