Skip to content

[discuss]: How to distinguish whether the 5xx status code (eg 500) comes from upstream or apisix #2501

Description

@Firstsawyou

Issue description

When our http request gets an error status code 5XX, for example: 500. How do we know if this status comes from upstream or apisix.

To know the source of the error status code, I think that in the response phase (header_filter), we can determine that the upstream response code is equal to 5XX. When it is equal to 5XX, we can set relevant headers in the response header to achieve our goal.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions