gql icon indicating copy to clipboard operation
gql copied to clipboard

OperationException(linkException: ResponseFormatException(originalException: type 'Null' is not a subtype of type 'String' in type cast

Open Routee opened this issue 2 years ago • 1 comments

image

if the backend throw a custom exception which message is null. This line:

error['message'] as String

will throw an excption. it's not the expected.

Routee avatar Aug 30 '23 14:08 Routee

Actually, a message is required by the graphql spec

See https://spec.graphql.org/October2021/#sec-Errors.Error-result-format

knaeckeKami avatar Aug 30 '23 15:08 knaeckeKami