Skip to content

Methods that access the resopnse should raise GraphQlException consistently #1219

Open
@GeorgEchterling

Description

@GeorgEchterling

When calling ClientResponseField.toEntity(someClass) on a field that cannot be deserialized into the given type, the method will throw an HttpMessageNotReadableException.

Spring MVC's ResponseEntityExceptionHandler will unfortunately convert this into a 400 Bad Request response, while this error should actually be treated as an internal server error. (The error was caused because the GraphQL response could not be read.)

It would be nice if ClientResponseField.toEntity could wrap this exception in a way that distinguishes it from actual client errors.

Spring GraphQL version: 1.4.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions