GQLExceptionParser class abstract

Project-level hook for converting raw link exceptions into GQLExceptions.

Parsers are called before the built-in OperationException.graphqlErrors path. The first parser that returns a non-null GQLException wins; returning null passes control to the next parser (or the built-in fallback).

Example:

class AcmeExceptionParser extends GQLExceptionParser {
  @override
  GQLException? parse(dynamic rawException) {
    // only handle what we recognise; return null for everything else
    if (rawException is! OperationException) return null;
    final body = rawException.linkException;
    if (body is! ServerException) return null;
    // ... extract Acme-specific error shape from body.parsedResponse.data
  }
}

Constructors

GQLExceptionParser()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(dynamic rawException) GQLException?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited