Skip to content

Error controller does not process a controller exception anymore #3623

Closed
@snicoll

Description

@snicoll

No idea if this is a regression in Boot or in Spring Framework at this point.

Consider the following

@ResponseStatus(value = HttpStatus.NOT_ACCEPTABLE)
@SuppressWarnings("serial")
private static class NoReasonExpectedException extends RuntimeException {

    public NoReasonExpectedException(String message) {
        super(message);
    }
}

and a controller that throws such exception with a dummy message. With 1.2 you get the standard JSON output as expected. With master the controller does not seem to process the request at all (and therefore an empty response is sent).

Seems like ResponseStatusExceptionResolver is doing something different in 4.2 now.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions