toErrorCode method

ErrorCode toErrorCode()

Implementation

ErrorCode toErrorCode() {
  switch (this) {
    case 'InternalError':
      return ErrorCode.internalError;
    case 'InvalidRequest':
      return ErrorCode.invalidRequest;
  }
  throw Exception('$this is not known in enum ErrorCode');
}