Skip to content

Different actuator port changes HTTP status codes on errors #10560

@sapirozz

Description

@sapirozz

Using spring-boot-actuator 1.5.4 and Spring boot admin 1.5.3 we cannot see the "Environment Manager" tab for our client applications.

The problem is caused by the wrong error code returned by the refresh endpoint with HTTP verb HEAD.
The spring admin expects 405 (Method not allowed) but the actuator endpoint returns error 500.

This problem is related to the definition of an alternative port for the management, in that case the Dispatch Servlet has only one Exception handler and not the standard two because it is configured by the EndpointWebMvcChildContextConfiguration class.

If we use the server port for the management, without an alternative port, the request on refresh endpoint with HEAD verb returns the right code 405.

For us the alternative port is necessary and we didn't find a workaround to solve the problem.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions