-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat!: Used HTTP status codes can be configured #383
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…is not required there
…ndler adjusted accordingly
dadrus
changed the title
wip: HTTP status codes can be overriden
wip: Used HTTP status codes can be configured
Dec 16, 2022
Codecov Report
@@ Coverage Diff @@
## main #383 +/- ##
==========================================
+ Coverage 86.45% 86.63% +0.17%
==========================================
Files 193 195 +2
Lines 7753 7790 +37
==========================================
+ Hits 6703 6749 +46
+ Misses 898 890 -8
+ Partials 152 151 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
dadrus
changed the title
wip: Used HTTP status codes can be configured
feat!: Used HTTP status codes can be configured
Dec 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR closes #157 but without offering an option to define custom payloads for error responses in verbose mode. Can't imagine right now, why this could be needed.
This PR does also introduce a breaking change:
verbose_errors
property is not supported any more in configuration of the services (proxy, decision and management). For the management service it had anyway never an effect and is also not required. The functionality of that property has however not disappeared. It has been moved to yet a new property, available for proxy and decision service configuration and is described below.Following is implemented by this PR: A new property, named
respond
has been introduced and can be configured for proxy and the decision service to allow verbose error responses and also to configure mappings for errors/states used internally by heimdall to HTTP response codes, if the defaults implemented by heimdall are not applicable.Here is an example for the decision service, which turns on verbose errors and maps a couple of HTTP status codes: