mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix: add information about target response into error message if inte… (#8281)
# Which Problems Are Solved Execution responses with HTTP StatusCode not equal to 200 interrupt the client request silently. # How the Problems Are Solved Adds information about the recieved StatusCode and Body into the error if StatusCode not 200. # Additional Context Closes #8177 --------- Co-authored-by: Elio Bischof <elio@zitadel.com> Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -169,4 +169,19 @@ For event there are 3 levels the condition can be defined:
|
||||
- Group, handling a specific group of events
|
||||
- All, handling any event in ZITADEL
|
||||
|
||||
The concept of events can be found under [Events](/concepts/architecture/software#events)
|
||||
The concept of events can be found under [Events](/concepts/architecture/software#events)
|
||||
|
||||
### Error forwarding
|
||||
|
||||
If you want to forward a specific error from the Target through ZITADEL, you can provide a response from the Target with status code 200 and a JSON in the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"forwardedStatusCode": 403,
|
||||
"forwardedErrorMessage": "Call is forbidden through the IP AllowList definition"
|
||||
}
|
||||
```
|
||||
|
||||
Only values from 400 to 499 will be forwarded through ZITADEL, other StatusCodes will end in a PreconditionFailed error.
|
||||
|
||||
If the Target returns any other status code than >= 200 and < 299, the execution is looked at as failed, and a PreconditionFailed error is logged.
|
||||
|
Reference in New Issue
Block a user