toErrorCode method
Implementation
ErrorCode toErrorCode() {
switch (this) {
case 'ResourceNotFoundException':
return ErrorCode.resourceNotFoundException;
case 'InvalidRequestException':
return ErrorCode.invalidRequestException;
case 'InternalFailureException':
return ErrorCode.internalFailureException;
case 'ServiceUnavailableException':
return ErrorCode.serviceUnavailableException;
case 'ThrottlingException':
return ErrorCode.throttlingException;
}
throw Exception('$this is not known in enum ErrorCode');
}