Skip to content

HATEOAS: ResponseEntity<Resource> from @ExceptionHandler method not converted to HAL #8174

Closed
@mvitz

Description

@mvitz

Given a controller like https://github.com/mvitz/spring-boot-hateoas-autoconfiguration-bug/blob/master/src/main/java/de/mvitz/spring/hateoas/server/ExceptionController.java with a @ExceptionHandler annotated method the response is not converted to valid HAL, see:

curl -i localhost:8080/exception -HAccept:application/hal+json
HTTP/1.1 400
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 02 Feb 2017 00:05:02 GMT
Connection: close

{"links":[{"rel":"self","href":"http://google.de"}],"message":"Foo"}

Maybe I am (again) missing some little thing here but I think given the example controller I should expect to receive a response with valid HAL.

Issue occurs with Spring-Boot 1.4.4.RELEASE and 1.5.1.RELEASE as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fixstatus: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions