Skip to content

ResourceWebHandler should throw ResponseStatusException when resources are not found [SPR-16023] #20572

@spring-projects-issues

Description

@spring-projects-issues

Brian Clozel opened SPR-16023 and commented

Currently ResourceWebHandler handles directly the response when resources are not found, sending an HTTP 404 response.

This is technically correct but this prevents from dealing with those in a central place, like a WebExceptionHandler. This change is required for a global error handling mechanism such as the one in Spring Boot.


Reference URL: spring-projects/spring-boot#8625

Referenced from: commits 3febec3

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