Skip to content

Bad HTTP error code on wrong logging level #8798

@rnavarropiris

Description

@rnavarropiris
  • affects version: Spring Boot 1.5.2.RELEASE
  • affects endpoint: loggers actuator endpoint (POST method)

Sending a request like this:

{
"configuredLevel": "SOME_WRONG_LEVEL"
}

towards /loggers/ROOT (e.g.) leads to a 500 (internal server error) response code instead of a 400 (bad request):

{
"timestamp": 1491232221140,
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.IllegalArgumentException",
"message": "No enum constant org.springframework.boot.logging.LogLevel.SOME_WRONG_LEVEL",
"path": "/loggers/ROOT"
}

As a sidenote, since a successful POST request does not return any data, probably the 204 status code (no content) would be more adequate (imo).

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions