statusCodeClientErrorFilter is the concise way to react to client side HTTP errors in a Fluxzy session. Pair it with capture, tagging or header actions to build a focused error triage workflow without writing an explicit list of codes.
Use statusCodeClientErrorFilter when you want a rule that fires for any response in the 4XX range. This is the simplest way to scope an action to client errors without listing every code individually.
Typical situations:
The filter evaluates on the responseHeaderReceivedFromRemote scope, so the status line is already parsed when it runs. Use statusCodeFilter if you need an exact match on one or two specific codes.
Apply a tag to any exchange that returned a 4XX status so you can build a saved view of client side problems.
rules:
- filter:
typeKind: StatusCodeClientErrorFilter
actions:
- typeKind: ApplyTagAction
tag:
value: client-error
Send any client error exchange to a separate capture file for later analysis with the rest of the rule pipeline left untouched.
rules:
- filter:
typeKind: StatusCodeClientErrorFilter
actions:
- typeKind: CaptureSessionAction
Append a documentation link header to every 4XX response so developers reading the response in their browser can find context quickly.
rules:
- filter:
typeKind: StatusCodeClientErrorFilter
actions:
- typeKind: AddResponseHeaderAction
headerName: X-Troubleshooting
headerValue: https://docs.example.com/errors/4xx
Select exchanges that HTTP status code indicates a client error (4XX).
Evaluation scope defines the timing where this filter will be applied.
responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.
statusCodeClientErrorFilter
This filter has no specific characteristic
The following table describes the customizable properties available for this filter:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| inverted | boolean | Negate the filter result | false |
The following examples apply a comment to the filtered exchange
Select exchanges that HTTP status code indicates a client error (4XX).
rules:
- filter:
typeKind: StatusCodeClientErrorFilter
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of StatusCodeClientErrorFilter for .NET integration.
The following filters are related to this filter:
Yes. The filter matches the entire 400 to 499 range, including non standard custom codes used by some APIs.
statusCodeFilter requires you to enumerate the exact codes you want. statusCodeClientErrorFilter is a shortcut for the whole 4XX class and is more concise when class level granularity is enough.
Yes, set inverted: true. The rule then matches every response whose status is not 4XX.
It evaluates on the responseHeaderReceivedFromRemote scope, as soon as the response status line is parsed. The body is still available to downstream actions.