Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@RestControllerAdvice that returns an object but handles errors from a void controller method does not return json #5796

Closed
geoand opened this issue Nov 27, 2019 · 0 comments · Fixed by #5803
Assignees
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Milestone

Comments

@geoand
Copy link
Contributor

geoand commented Nov 27, 2019

A simple way to reproduce this error is to change the existing spring-web integration to use :

    @GetMapping("/responseEntity")
    public Greeting handledByResponseEntity() {
        throw new IllegalStateException("bad state");
    }

to:

    @GetMapping("/responseEntity")
    public void handledByResponseEntity() {
        throw new IllegalStateException("bad state");
    }

in the ExceptionThrowingController class

@geoand geoand added kind/bug Something isn't working area/spring Issues relating to the Spring integration labels Nov 27, 2019
@geoand geoand self-assigned this Nov 27, 2019
geoand added a commit to geoand/quarkus that referenced this issue Nov 27, 2019
@geoand geoand changed the title A @RestControllerAdvice that handles errors from a void method does not return json @RestControllerAdvice that handles errors from a void method does not return json Nov 27, 2019
@geoand geoand changed the title @RestControllerAdvice that handles errors from a void method does not return json @RestControllerAdvice that handles errors from a void controller method does not return json Nov 27, 2019
@geoand geoand changed the title @RestControllerAdvice that handles errors from a void controller method does not return json @RestControllerAdvice that returns an object but handles errors from a void controller method does not return json Nov 27, 2019
geoand added a commit to geoand/quarkus that referenced this issue Nov 27, 2019
geoand added a commit that referenced this issue Nov 27, 2019
Fix various usability issues in Spring @RestControllerAdvice handling
@gsmet gsmet added this to the 1.0.1.Final milestone Nov 27, 2019
gsmet pushed a commit that referenced this issue Nov 27, 2019
mmusgrov pushed a commit to mmusgrov/quarkus that referenced this issue Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants