Class: Slack::Web::Api::Errors::SlackError

Inherits:
Faraday::Error
  • Object
show all
Defined in:
lib/slack/web/api/errors/slack_error.rb

Direct Known Subclasses

AccessDenied, Accesslimited, AccountInactive, AdminUnauthorized, AlreadyApproved, AlreadyArchived, AlreadyInChannel, AlreadyInTeam, AlreadyInTeamInvitedUser, AlreadyInvited, AlreadyPinned, AlreadyProcessed, AlreadyReacted, AlreadyStarred, AppManagementAppNotInstalledOnOrg, AppMissingActionUrl, AppNotFound, AppRestrictedOrgWide, ApprovalInactive, ApprovalNotFound, AsUserNotSupported, AtLeastOneSessionSettingRequired, AuthMismatch, AutoProvisionFailure, BadClientSecret, BadHandle, BadImage, BadRedirectUri, BadTimestamp, BadTitle, BadToken, BadUrl, BadUsers, BarrierAlreadyExists, BarrierNotFound, BarrieredFromUsergroupsNotFound, BotNotFound, BotUserRequired, BotsNotAllowed, BotsNotFound, CanNotUninstall, CannotAddBot, CannotAddLegacyDisconnectedChannelToWorkspaces, CannotAddMoreChannelsToGroup, CannotAddMoreGroupsToChannel, CannotAddOthers, CannotAddOthersRecurring, CannotAddProfileOnlyUser, CannotAddSlackbot, CannotAuthUser, CannotCompleteOthers, CannotCompleteRecurring, CannotCreateChannel, CannotCreateDialog, CannotFindChannel, CannotFindMessage, CannotFindService, CannotInstallAnOrgInstalledApp, CannotInvalidatePrimaryOwner, CannotKickHomeTeam, CannotKickTeam, CannotModifyPrimaryOwner, CannotMoveLocalChannel, CannotParse, CannotParseAttachment, CannotPrompt, CannotResetBot, CannotResetPrimaryOwner, CannotSetBothNumMinutesAndIsIndefinite, CannotSetThisGuestToRegularAtTeamLevel, CannotShareCrossWorkspaceChannel, CannotShareMandatoryChannel, CannotUnfurlMessage, CannotUnfurlUrl, CannotUpdateAdminUser, CantArchiveGeneral, CantArchiveRequired, CantBroadcastMessage, CantDelete, CantDeleteFile, CantDeleteMessage, CantInvite, CantInviteSelf, CantKickFromGeneral, CantKickSelf, CantLeaveGeneral, CantUpdateMessage, ChannelArchived, ChannelCannotBeUnshared, ChannelConversionInProgress, ChannelIsNotPrivate, ChannelMentionSyncRequired, ChannelNotArchived, ChannelNotFound, ChannelTypeNotSupported, ClientIdTokenMismatch, CodeAlreadyUsed, ComplianceExportsPreventDeletion, ConnectionLimitExceeded, ConnectionLimitExceededPending, CouldNotArchiveChannel, CouldNotConvertChannel, CouldNotCreateChannel, CouldNotCreateWorkspace, CouldNotDeleteChannel, CouldNotGetConversationPrefs, CouldNotGetRetention, CouldNotGetTeams, CouldNotRemoveRetention, CouldNotRenameChannel, CouldNotSetChannelPref, CouldNotSetRetention, CouldNotSetTeamsForChannel, CouldNotUnarchiveChannel, CustomIntegrationNotAllowedAtEnterprise, DataNotAvailable, DefaultChannelRestricted, DefaultOrgWideChannel, DeprecatedEndpoint, DescriptionTooLong, DiscoverabilitySettingInvalid, DomainTaken, DuplicateChannelNotFound, DuplicateExternalId, DuplicateMessageNotFound, EditWindowClosed, EkmAccessDenied, EmailDoesNotMatch, EmailTaken, EmojiLimitReached, EmojiNotFound, EnterpriseIsRestricted, EnterpriseNotFound, EntityNotFound, ErrorBadFormat, ErrorBadNameI18n, ErrorBadUpload, ErrorBadWide, ErrorInvalidAlias, ErrorInvalidEmojiToRename, ErrorMissingName, ErrorNameTaken, ErrorNameTakenI18n, ErrorNoImage, ErrorTooBig, ExchangedTriggerId, ExpiredTriggerId, ExternalChannelMigrating, ExternallySharedOrDisconnectedChannel, FailToGetTeamsForRestrictedUser, FailedAddingCollaborator, FailedCreatingApp, FailedExport, FailedForSomeUsers, FailedLookingUpUser, FailedSendingDialog, FailedToAddEmoji, FailedToAliasEmoji, FailedToFetchActiveTeam, FailedToFetchInfo, FailedToRemoveGroupUsers, FailedToRemoveUserFromWorkspace, FailedToRenameEmoji, FailedToSendInvite, FailedToSetDefaultChannels, FailedToSetDescription, FailedToSetDiscoverability, FailedToSetExpiration, FailedToSetIcon, FailedToSetName, FailedToSetUserToAdmin, FailedToSetUserToOwner, FailedToSetUserToRegular, FailedToUnlinkChannel, FailedToUnshare, FailedToValidateCaller, FailedToValidateChannels, FailedToValidateCustomMessage, FailedToValidateExpiration, FailedToValidateTeam, FailureRemovingEmoji, FatalError, FeatureNotEnabled, FetchMembersFailed, FileCommentNotFound, FileDeleted, FileDeletingDisabled, FileNotFound, FileNotShared, FileNotYetAvailable, FileUnderReview, ForbiddenHandle, ForbiddenTeam, GroupAlreadyLinkedToChannel, GroupMustNotBeEmpty, GroupNotFound, HandleAlreadyExists, HasAlreadyConnectedToOrg, HashConflict, InactiveCall, InactiveInvite, InsecureRequest, InternalError, InvalidAction, InvalidActor, InvalidApp, InvalidAppId, InvalidArgName, InvalidArgs, InvalidArguments, InvalidArrayArg, InvalidAttachments, InvalidAuth, InvalidBlocks, InvalidBlocksFormat, InvalidCallId, InvalidChannel, InvalidChannelId, InvalidChannelProvided, InvalidChannelType, InvalidChannelsLimit, InvalidCharset, InvalidClientId, InvalidCode, InvalidCreatedBy, InvalidCursor, InvalidDate, InvalidDuration, InvalidEmail, InvalidEmojiNotAllowed, InvalidEventContext, InvalidExternalId, InvalidFormData, InvalidGrantType, InvalidGroupProvided, InvalidHostTeam, InvalidInputs, InvalidLimit, InvalidLink, InvalidManifest, InvalidMetadataFilterKeys, InvalidName, InvalidNameMaxlength, InvalidNamePunctuation, InvalidNameRequired, InvalidNameSpecials, InvalidOutputs, InvalidPayload, InvalidPermissions, InvalidPostType, InvalidPresence, InvalidPrivacy, InvalidProfile, InvalidRefreshToken, InvalidRequest, InvalidRequestId, InvalidRestrictedSubjects, InvalidRoleForUser, InvalidScheduledMessageId, InvalidScopes, InvalidSearchChannelType, InvalidSort, InvalidSortDir, InvalidSource, InvalidStartTime, InvalidStepStatus, InvalidTargetTeam, InvalidTeam, InvalidTeamIds, InvalidTime, InvalidTimestamp, InvalidTitle, InvalidToken, InvalidTrigger, InvalidTriggerId, InvalidTsLatest, InvalidTsOldest, InvalidType, InvalidTypes, InvalidUnfurlId, InvalidUnfurlsFormat, InvalidUrl, InvalidUser, InvalidUserCombination, InvalidUserId, InvalidUsers, InvalidValue, InviteFromSameOrg, InviteLookupError, InviteNotFound, InviteUsed, InvitedUserNotCreated, InvitedUserNotReactivated, InviteeCantSeeChannel, IsArchived, IsBot, IsInactive, IsPendingConnectedToOrg, LastMember, LeavingTeamNotInChannel, LeavingTeamRequired, LegacyConnectionInvalidOrg, LegacyConnectionLimitExceeded, LimitRequired, LinkNotFound, MalwareDetected, MemberAnalyticsDisabled, MemberLimitExceeded, MessageNotFound, MessageTooLong, MessagesTabDisabled, MetadataNotAvailable, MetadataOnlyDoesNotSupportDate, MethodDeprecated, MethodNotSupportedForChannelType, MigrationInProgress, MissingArgs, MissingArgument, MissingChannel, MissingDialog, MissingDuration, MissingPostType, MissingProfileId, MissingResource, MissingScope, MissingSource, MissingSubteamName, MissingTargetTeam, MissingTeam, MissingTrigger, MissingTs, MissingUnfurlId, MissingUnfurls, MissingUser, MsgTooLong, MustClearBothStatusTextAndStatusEmoji, MustProvideTeamDomain, MustProvideTeamName, MustRevokeAccess, NameAlreadyExists, NameTaken, NameTakenInOrg, NameTooLong, NoActiveSessions, NoAliasSelected, NoBotUserForApp, NoChannel, NoDualBroadcastContentUpdate, NoImageUploaded, NoItemSpecified, NoLocalUserOnTeam, NoPermission, NoPin, NoReaction, NoResolutionFound, NoScopes, NoSuchSubteam, NoTeamIdsGiven, NoTeamsToDisconnect, NoText, NoUser, NoUserProvided, NoUsersProvided, NotAdmin, NotAllowed, NotAllowedForGridWorkspace, NotAllowedTokenType, NotAnAdmin, NotAnEnterprise, NotAppAdmin, NotArchived, NotAuthed, NotAuthorized, NotBearerToken, NotEnabled, NotEnoughUsers, NotEnterpriseTeam, NotFound, NotImplemented, NotInChannel, NotInDnd, NotOwner, NotPaid, NotPinnable, NotPinned, NotReactable, NotStarred, NotSupported, OauthAuthorizationUrlMismatch, OneOrMoreInvalidChannels, OrgLevelEmailDisplayDisabled, OrgLoginRequired, OrgNotFound, OrgUserNotInTeam, OverMaxEntityLimit, OverPaginationLimit, PaginationNotAvailable, PaidOnly, PaidTeamsOnly, PermissionDenied, PlanUpgradeRequired, PolicyNotFound, PostingToGeneralChannelDenied, PreviewFeatureNotAvailable, PrimaryUsergroupNotFound, ProfileSetFailed, PublicVideoNotAllowed, PublishedAppOnly, PushLimitReached, RateLimited, Ratelimit, Ratelimited, RequestAlreadyResolved, RequestIdOrAppIdIsRequired, RequestIdRequiredForCustomIntegrations, RequestTimeout, ReservedName, ResizedButStillTooLarge, RestrictedAction, RestrictedActionNonThreadableChannel, RestrictedActionReadOnlyChannel, RestrictedActionThreadLocked, RestrictedActionThreadOnlyChannel, RetentionOverrideNotAllowed, RtmConnectRequired, SentRecently, ServiceUnavailable, SessionExpired, SessionInvalidationFailed, SessionNotFound, SessionResetNotAllowed, SlackConnectBlockedFileType, SlackConnectClipSharingBlocked, SlackConnectFileLinkSharingBlocked, SlackConnectFileUploadSharingBlocked, SnoozeEndFailed, SnoozeFailed, SnoozeNotActive, SpecifyEnterpriseOrTeams, SubteamMaxUsersExceeded, TeamAccessNotGranted, TeamAddedToOrg, TeamIdOrOrgRequired, TeamIdRequiredForEnterprise, TeamNotFound, TeamNotOnEnterprise, TeamsNotFound, ThreadLocked, ThreadNotFound, TimeInPast, TimeTooFar, TokenAlreadyExchanged, TokenExpired, TokenRevoked, TokenRotationNotEnabled, TooLarge, TooLong, TooManyAttachments, TooManyContactCards, TooManyConvosForAppOnTeam, TooManyConvosForTeam, TooManyEmails, TooManyEmoji, TooManyFrames, TooManyIds, TooManyIdsProvided, TooManyLinkedChannels, TooManyMembers, TooManyPins, TooManyReactions, TooManyTargetTeams, TooManyTeams, TooManyTeamsProvided, TooManyUsers, TriggerExchanged, TriggerExpired, TwoFactorSetupRequired, UnableToLinkIdpGroupAndChannel, UnableToUnlinkIdpGroupAndChannel, UnableToUpdateExistingSessions, UnknownError, UnknownMethod, UnknownType, UnsupportedArguments, UnsupportedContextType, UnsupportedTeamType, UpdateFailed, UraMaxChannels, UrlInMessage, UserAlreadyDeleted, UserAlreadyTeamMember, UserCannotCreateChannel, UserDisabled, UserDoesNotOwnChannel, UserIsAlreadyDeleted, UserIsBot, UserIsNotAGuest, UserIsRestricted, UserIsUltraRestricted, UserMustBeAdmin, UserMustBeInWorkspace, UserNotFound, UserNotInChannel, UserNotVisible, UserRequiredToAcceptAsPrivateButCannot, UserSessionResetFailed, UsergroupNotFound, UsergroupNotLinkedToTeam, UsergroupTeamNotProvisioned, UsersListNotSupplied, UsersNotFound, ValidationErrors, ViewTooLarge

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response = nil) ⇒ SlackError

Returns a new instance of SlackError.



9
10
11
12
# File 'lib/slack/web/api/errors/slack_error.rb', line 9

def initialize(message, response = nil)
  super message
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/slack/web/api/errors/slack_error.rb', line 7

def response
  @response
end

Instance Method Details

#errorObject



14
15
16
# File 'lib/slack/web/api/errors/slack_error.rb', line 14

def error
  response.body.error
end

#errorsObject



18
19
20
# File 'lib/slack/web/api/errors/slack_error.rb', line 18

def errors
  response.body.errors
end

#response_metadataObject



22
23
24
# File 'lib/slack/web/api/errors/slack_error.rb', line 22

def 
  response.body.
end