Skip to content

Gateway cannot handle custom status codes #284

@dougsaus

Description

@dougsaus

Using 2.0.0.M9

Spring cloud gateway doesn't seem to support http status codes other than standard Spring HttpStatus enumerated values.

Some solutions choose to implement their own custom status codes and provide meaning to them through service documentation. Going through the gateway to these services causes an exception and a 500 to be returned instead of the status code given by the service.

Gateway exception:
java.lang.IllegalArgumentException: No matching constant for [432]

I understand the default opinion that services should use standard RFC backed status codes. Can we add the option to override this behavior and allow non-standard status codes to pass through the gateway unhindered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions