Errors
The Files.com DotNet SDK will return errors by raising exceptions. There are many exception classes defined in the Files SDK that correspond to specific errors.
The raised exceptions come from two categories:
- SDK Exceptions - errors that originate within the SDK
- API Exceptions - errors that occur due to the response from the Files.com API. These errors are grouped into common error types.
There are several types of exceptions within each category. Exception classes indicate different types of errors and are named in a
fashion that describe the general premise of the originating error. More details can be found in the exception object message using the
Message attribute.
Use standard DotNet exception handling to detect and deal with errors. It is generally recommended to catch specific errors first, then
catch the general SdkException exception as a catch-all.
Error Types
SDK Errors
SDK errors are general errors that occur within the SDK code. These errors generate exceptions. Each of these
exception classes inherit from a standard SdkException base class.
SDK Exception Classes
| Exception Class Name | Description |
|---|---|
ApiConnectionException | The Files.com API cannot be reached |
InvalidParameterException | A passed in parameter is invalid |
NotImplementedException | The called method has not be implemented by the SDK |
InvalidResponseException | A bad formed response came back from the API |
API Errors
API errors are errors returned by the Files.com API. Each exception class inherits from an error group base class. The error group base class indicates a particular type of error.
API Exception Classes
| Exception Class Name | Error Group |
|---|---|
AgentUpgradeRequiredException | BadRequestException |
AttachmentTooLargeException | BadRequestException |
CannotDownloadDirectoryException | BadRequestException |
CantMoveWithMultipleLocationsException | BadRequestException |
DatetimeParseException | BadRequestException |
DestinationSameException | BadRequestException |
DestinationSiteMismatchException | BadRequestException |
DoesNotSupportSortingException | BadRequestException |
FolderMustNotBeAFileException | BadRequestException |
FoldersNotAllowedException | BadRequestException |
InternalGeneralErrorException | BadRequestException |
InvalidBodyException | BadRequestException |
InvalidCursorException | BadRequestException |
InvalidCursorTypeForSortException | BadRequestException |
InvalidEtagsException | BadRequestException |
InvalidFilterAliasCombinationException | BadRequestException |
InvalidFilterFieldException | BadRequestException |
InvalidFilterParamException | BadRequestException |
InvalidFilterParamFormatException | BadRequestException |
InvalidFilterParamValueException | BadRequestException |
InvalidInputEncodingException | BadRequestException |
InvalidInterfaceException | BadRequestException |
InvalidOauthProviderException | BadRequestException |
InvalidPathException | BadRequestException |
InvalidReturnToUrlException | BadRequestException |
InvalidSearchQueryException | BadRequestException |
InvalidSortFieldException | BadRequestException |
InvalidSortFilterCombinationException | BadRequestException |
InvalidUploadOffsetException | BadRequestException |
InvalidUploadPartGapException | BadRequestException |
InvalidUploadPartSizeException | BadRequestException |
InvalidWorkspaceIdHeaderException | BadRequestException |
MethodNotAllowedException | BadRequestException |
MultipleSortParamsNotAllowedException | BadRequestException |
NoValidInputParamsException | BadRequestException |
OffsetUploadNotAllowedWithMalwareScanningException | BadRequestException |
PartNumberTooLargeException | BadRequestException |
PathCannotHaveTrailingWhitespaceException | BadRequestException |
ReauthenticationNeededFieldsException | BadRequestException |
RequestBodyTooLargeException | BadRequestException |
RequestParamsContainInvalidCharacterException | BadRequestException |
RequestParamsInvalidException | BadRequestException |
RequestParamsRequiredException | BadRequestException |
SearchAllOnChildPathException | BadRequestException |
UnrecognizedSortIndexException | BadRequestException |
UnsupportedCurrencyException | BadRequestException |
UnsupportedHttpResponseFormatException | BadRequestException |
UnsupportedMediaTypeException | BadRequestException |
UserIdInvalidException | BadRequestException |
UserIdOnUserEndpointException | BadRequestException |
UserRequiredException | BadRequestException |
AdditionalAuthenticationRequiredException | NotAuthenticatedException |
ApiKeySessionsNotSupportedException | NotAuthenticatedException |
AuthenticationRequiredException | NotAuthenticatedException |
BundleRegistrationCodeFailedException | NotAuthenticatedException |
FilesAgentTokenFailedException | NotAuthenticatedException |
InboxRegistrationCodeFailedException | NotAuthenticatedException |
InvalidCredentialsException | NotAuthenticatedException |
InvalidOauthException | NotAuthenticatedException |
InvalidOrExpiredCodeException | NotAuthenticatedException |
InvalidSessionException | NotAuthenticatedException |
InvalidUsernameOrPasswordException | NotAuthenticatedException |
LockedOutException | NotAuthenticatedException |
LockoutRegionMismatchException | NotAuthenticatedException |
OneTimePasswordIncorrectException | NotAuthenticatedException |
TwoFactorAuthenticationErrorException | NotAuthenticatedException |
TwoFactorAuthenticationSetupExpiredException | NotAuthenticatedException |
ApiKeyIsDisabledException | NotAuthorizedException |
ApiKeyIsPathRestrictedException | NotAuthorizedException |
ApiKeyOnlyForDesktopAppException | NotAuthorizedException |
ApiKeyOnlyForMobileAppException | NotAuthorizedException |
ApiKeyOnlyForOfficeIntegrationException | NotAuthorizedException |
BillingInformationHiddenException | NotAuthorizedException |
BillingPermissionRequiredException | NotAuthorizedException |
BundleMaximumUsesReachedException | NotAuthorizedException |
BundlePermissionRequiredException | NotAuthorizedException |
CannotLoginWhileUsingKeyException | NotAuthorizedException |
CantActForOtherUserException | NotAuthorizedException |
ContactAdminForPasswordChangeHelpException | NotAuthorizedException |
FilesAgentFailedAuthorizationException | NotAuthorizedException |
FolderAdminOrBillingPermissionRequiredException | NotAuthorizedException |
FolderAdminPermissionRequiredException | NotAuthorizedException |
FullPermissionRequiredException | NotAuthorizedException |
HistoryPermissionRequiredException | NotAuthorizedException |
InAppAiAssistantUnavailableException | NotAuthorizedException |
InsufficientPermissionForParamsException | NotAuthorizedException |
InsufficientPermissionForSiteException | NotAuthorizedException |
MoverAccessDeniedException | NotAuthorizedException |
MoverPackageRequiredException | NotAuthorizedException |
MustAuthenticateWithApiKeyException | NotAuthorizedException |
NeedAdminPermissionForInboxException | NotAuthorizedException |
NonAdminsMustQueryByFolderOrPathException | NotAuthorizedException |
NotAllowedToCreateBundleException | NotAuthorizedException |
NotEnqueuableSyncException | NotAuthorizedException |
PasswordChangeNotRequiredException | NotAuthorizedException |
PasswordChangeRequiredException | NotAuthorizedException |
PaymentMethodErrorException | NotAuthorizedException |
PreviewOnlyPermissionCannotDownloadException | NotAuthorizedException |
ReadOnlySessionException | NotAuthorizedException |
ReadPermissionRequiredException | NotAuthorizedException |
ReauthenticationFailedException | NotAuthorizedException |
ReauthenticationFailedFinalException | NotAuthorizedException |
ReauthenticationNeededActionException | NotAuthorizedException |
RecaptchaFailedException | NotAuthorizedException |
RemoteDesktopDebugLoggingDisabledException | NotAuthorizedException |
RootFolderBehaviorSiteAdminRequiredException | NotAuthorizedException |
RootFolderBehaviorSkipSiteAdminRequiredException | NotAuthorizedException |
SelfManagedRequiredException | NotAuthorizedException |
SiteAdminOrPartnerAdminPermissionRequiredException | NotAuthorizedException |
SiteAdminOrWorkspaceAdminOrFolderAdminPermissionRequiredException | NotAuthorizedException |
SiteAdminOrWorkspaceAdminOrPartnerAdminOrFolderAdminPermissionRequiredException | NotAuthorizedException |
SiteAdminOrWorkspaceAdminOrPartnerAdminPermissionRequiredException | NotAuthorizedException |
SiteAdminOrWorkspaceAdminPermissionRequiredException | NotAuthorizedException |
SiteAdminRequiredException | NotAuthorizedException |
SiteFilesAreImmutableException | NotAuthorizedException |
TwoFactorAuthenticationRequiredException | NotAuthorizedException |
UserIdWithoutSiteAdminException | NotAuthorizedException |
WriteAndBundlePermissionRequiredException | NotAuthorizedException |
WritePermissionRequiredException | NotAuthorizedException |
ApiKeyNotFoundException | NotFoundException |
BundlePathNotFoundException | NotFoundException |
BundleRegistrationNotFoundException | NotFoundException |
CodeNotFoundException | NotFoundException |
FileNotFoundException | NotFoundException |
FileUploadNotFoundException | NotFoundException |
GroupNotFoundException | NotFoundException |
InboxNotFoundException | NotFoundException |
NestedNotFoundException | NotFoundException |
PlanNotFoundException | NotFoundException |
SiteNotFoundException | NotFoundException |
UserNotFoundException | NotFoundException |
AgentPushUpdateBlockedException | ProcessingFailureException |
AgentUnavailableException | ProcessingFailureException |
AiTaskCannotBeRunManuallyException | ProcessingFailureException |
AlreadyCompletedException | ProcessingFailureException |
AutomationCannotBeRunManuallyException | ProcessingFailureException |
BehaviorNotAllowedOnRemoteServerException | ProcessingFailureException |
BufferedUploadDisabledForThisDestinationException | ProcessingFailureException |
BundleOnlyAllowsPreviewsException | ProcessingFailureException |
BundleOperationRequiresSubfolderException | ProcessingFailureException |
ConfigurationLockedPathException | ProcessingFailureException |
CouldNotCreateParentException | ProcessingFailureException |
DestinationExistsException | ProcessingFailureException |
DestinationFolderLimitedException | ProcessingFailureException |
DestinationParentConflictException | ProcessingFailureException |
DestinationParentDoesNotExistException | ProcessingFailureException |
ExceededRuntimeLimitException | ProcessingFailureException |
ExpectationAlreadyHasOpenWindowException | ProcessingFailureException |
ExpectationNotManualTriggerException | ProcessingFailureException |
ExpiredPrivateKeyException | ProcessingFailureException |
ExpiredPublicKeyException | ProcessingFailureException |
ExportFailureException | ProcessingFailureException |
ExportNotReadyException | ProcessingFailureException |
FailedToChangePasswordException | ProcessingFailureException |
FileLockedException | ProcessingFailureException |
FileNotUploadedException | ProcessingFailureException |
FilePendingProcessingException | ProcessingFailureException |
FileProcessingErrorException | ProcessingFailureException |
FileTooBigToDecryptException | ProcessingFailureException |
FileTooBigToEncryptException | ProcessingFailureException |
FileUploadedToWrongRegionException | ProcessingFailureException |
FilenameTooLongException | ProcessingFailureException |
FolderLockedException | ProcessingFailureException |
FolderNotEmptyException | ProcessingFailureException |
HistoryUnavailableException | ProcessingFailureException |
InvalidBundleCodeException | ProcessingFailureException |
InvalidFileTypeException | ProcessingFailureException |
InvalidFilenameException | ProcessingFailureException |
InvalidPriorityColorException | ProcessingFailureException |
InvalidRangeException | ProcessingFailureException |
InvalidSiteException | ProcessingFailureException |
InvalidZipFileException | ProcessingFailureException |
MetadataNotSupportedOnRemotesException | ProcessingFailureException |
ModelSaveErrorException | ProcessingFailureException |
MultipleProcessingErrorsException | ProcessingFailureException |
PathTooLongException | ProcessingFailureException |
RecipientAlreadySharedException | ProcessingFailureException |
RemoteServerErrorException | ProcessingFailureException |
ResourceBelongsToParentSiteException | ProcessingFailureException |
ResourceLockedException | ProcessingFailureException |
SubfolderLockedException | ProcessingFailureException |
SyncInProgressException | ProcessingFailureException |
TwoFactorAuthenticationCodeAlreadySentException | ProcessingFailureException |
TwoFactorAuthenticationCountryBlacklistedException | ProcessingFailureException |
TwoFactorAuthenticationGeneralErrorException | ProcessingFailureException |
TwoFactorAuthenticationMethodUnsupportedErrorException | ProcessingFailureException |
TwoFactorAuthenticationUnsubscribedRecipientException | ProcessingFailureException |
UpdatesNotAllowedForRemotesException | ProcessingFailureException |
DuplicateShareRecipientException | RateLimitedException |
ReauthenticationRateLimitedException | RateLimitedException |
TooManyConcurrentLoginsException | RateLimitedException |
TooManyConcurrentRequestsException | RateLimitedException |
TooManyLoginAttemptsException | RateLimitedException |
TooManyRequestsException | RateLimitedException |
TooManySharesException | RateLimitedException |
AutomationsUnavailableException | ServiceUnavailableException |
MigrationInProgressException | ServiceUnavailableException |
SiteDisabledException | ServiceUnavailableException |
UploadsUnavailableException | ServiceUnavailableException |
AccountAlreadyExistsException | SiteConfigurationException |
AccountOverdueException | SiteConfigurationException |
NoAccountForSiteException | SiteConfigurationException |
SiteWasRemovedException | SiteConfigurationException |
TrialExpiredException | SiteConfigurationException |
TrialLockedException | SiteConfigurationException |
UserRequestsEnabledRequiredException | SiteConfigurationException |