Skip to content

Lower log level of ResponseStatusExceptionHandler [SPR-16049] #20598

Closed
@spring-projects-issues

Description

@spring-projects-issues

Stéphane Nicoll opened SPR-16049 and commented

Assuming the following code

@GetMapping("/speakers/{id}")
public Mono<Speaker> byId(@PathVariable String id) {
    return this.repository.findById(id)
            .switchIfEmpty(Mono.error(new ResponseStatusException(HttpStatus.NOT_FOUND)));
}

logs at error level when an unknown id is provided:

ERROR 9551 --- [      Thread-15] o.s.w.s.h.ResponseStatusExceptionHandler : Response status 404

ERROR for an expected case sounds too high.


Affects: 5.0 GA

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions