extractGpException static method

GpException? extractGpException(
  1. Object error
)

Implementation

static GpException? extractGpException(Object error) {
  if (error is GpException) {
    return error;
  }

  if (error is DioException) {
    final innerError = error.error;
    if (innerError is GpException) {
      return innerError;
    }
  }

  return null;
}