Exception: DropboxApi::Errors::BasicError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dropbox_api/errors/basic_error.rb

Direct Known Subclasses

AddFileMemberError, AddFolderMemberError, AddMemberSelectorError, AlreadySharedError, BadPathError, CantCopySharedFolderError, CantMoveFolderIntoItselfError, CantNestSharedFolderError, CantShareOutsideTeamError, ContainsSharedFolderError, ConversionError, CreateFileRequestError, CreateFolderBatchError, CreateFolderError, CreateSharedLinkWithSettingsError, CursorClosedError, CursorNotClosedError, DeleteError, DisallowedNameError, DisallowedSharedLinkPolicyError, DownloadError, DownloadFailedError, EmailUnverifiedError, FileAncestorConflictError, FileConflictError, FileMemberActionError, FolderConflictError, GetAccountError, GetCopyReferenceError, GetMetadataError, GroupDeletedError, GroupNotOnTeamError, InProgressError, InsideAppFolderError, InsideOsxPackageError, InsidePublicFolderError, InsideSharedFolderError, InsufficientPlanError, InsufficientSpaceError, InternalError, InvalidCommentError, InvalidCopyReferenceError, InvalidCursorError, InvalidDropboxIdError, InvalidEmailError, InvalidFileError, InvalidIdError, InvalidMemberError, InvalidPathError, InvalidRevisionError, InvalidSettingsError, InvalidUrlError, IsAppFolderError, IsFileError, IsFolderError, IsOsxPackageError, IsPublicFolderError, ListFolderContinueError, ListFolderError, ListFolderLongpollError, ListRevisionsError, ListSharedLinksError, LookupError, MalformedPathError, NoAccountError, NoPermissionError, NoWritePermissionError, NotAMemberError, NotFileError, NotFolderError, NotFoundError, PollError, PreviewError, RateLimitError, RelocationBatchEntryError, RelocationError, RestoreError, RestrictedContentError, RevokeSharedLinkError, SaveCopyReferenceError, SaveUrlError, SearchError, SettingsError, ShareFolderError, SharePathError, SharedFolderAccessError, SharedLinkAccessDeniedError, SharedLinkAlreadyExistsError, SharedLinkError, SharedLinkMalformedError, SharedLinkNotFoundError, SharingFileAccessError, SharingUserError, TeamFolderError, TeamPolicyDisallowsMemberPolicyError, ThumbnailBatchError, ThumbnailError, TooManyFilesError, TooManyMembersError, TooManyPendingInvitesError, TooManyRequestsError, TooManySharedFolderTargetsError, UnmountedError, UnshareFileError, UnsupportedContentError, UnsupportedExtensionError, UnsupportedImageError, UnsupportedLinkTypeError, UnverifiedDropboxId, UploadError, UploadSessionFinishError, UploadSessionLookupError, UploadSessionOffsetError, UploadWriteFailedError, WriteConflictError, WriteError

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, metadata) ⇒ BasicError

Returns a new instance of BasicError.



3
4
5
6
# File 'lib/dropbox_api/errors/basic_error.rb', line 3

def initialize(message, )
  @metadata = 
  super message
end

Class Method Details

.build(message, metadata) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/dropbox_api/errors/basic_error.rb', line 9

def build(message, )
  subtype,  = find_subtype 

  if subtype.nil?
    new message, 
  else
    subtype.build message, 
  end
end

.find_subtype(metadata) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/dropbox_api/errors/basic_error.rb', line 19

def find_subtype()
  if defined? self::ErrorSubtypes
    discriminator = [".tag"]
     = [discriminator] unless [discriminator].nil?
    [self::ErrorSubtypes[discriminator.to_sym], ]
  else
    [nil, ]
  end
end