toErrorCode method

ErrorCode toErrorCode()

Implementation

ErrorCode toErrorCode() {
  switch (this) {
    case 'AccessDenied':
      return ErrorCode.accessDenied;
    case 'InternalServerError':
      return ErrorCode.internalServerError;
  }
  throw Exception('$this is not known in enum ErrorCode');
}