New Transparent capture is in preview. Record every app's traffic with no proxy configuration, on Windows, macOS and Linux. Learn more

statusCodeClientErrorFilter Filter

Select exchanges whose response status code falls in the 4XX client error range, covering everything from 400 Bad Request to 499 custom codes.

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.

When to use this filter

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:

  • Tagging every 4XX response so you can pivot the timeline by error class.
  • Capturing client error exchanges into a dedicated file for offline triage.
  • Adding a header to every 4XX response that points to internal troubleshooting documentation.

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.

Real world examples

Tag every client error response

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

Capture all 4XX responses to a dedicated session

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

Add a troubleshooting header to client errors

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

Reference

statusCodeClientErrorFilter

Description

Select exchanges that HTTP status code indicates a client error (4XX).

Evaluation scope

Evaluation scope defines the timing where this filter will be applied.

responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.

YAML configuration name

statusCodeClientErrorFilter

Settings

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

Example of usage

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

.NET reference

View definition of StatusCodeClientErrorFilter for .NET integration.

See also

The following filters are related to this filter:

Frequently asked questions

Does this cover every 4XX code?

Yes. The filter matches the entire 400 to 499 range, including non standard custom codes used by some APIs.

How is it different from statusCodeFilter?

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.

Can I exclude client errors from another rule?

Yes, set inverted: true. The rule then matches every response whose status is not 4XX.

When does the filter fire in the pipeline?

It evaluates on the responseHeaderReceivedFromRemote scope, as soon as the response status line is parsed. The body is still available to downstream actions.

Learn more about Fluxzy rules