Skip to content

Exceptions are not fully deserialized  #993

Open
@thboileau

Description

@thboileau

tested scenario:

  • create a subclass of Exception, with the following annotation (the exception will be serialized by default, and not the status):
@Status(value = 500)
  • define an annotated interface that declares this exception
@Get
public abstract String test() throws MyException;
  • define a ServerResource that implements the interface, and that only throws the exception
  • use the ClientResource and wrap the interface:
ClientResource cr = new ClientResource("http://localhost:8182/");
MyResource myResource = cr.wrap(MyResource.class);
try {
    myResource.test();
} catch (MyException e) {
    e.printStackTrace();
    System.out.println("e.getMessage() " + e.getMessage());
}

The exception's message attribute is null, whereas the entity of the response contains the "message" attribute.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions