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

AccountInactive, AlreadyArchived, AlreadyInChannel, AlreadyInTeam, AlreadyInTeamInvitedUser, AlreadyInvited, AlreadyPinned, AlreadyProcessed, AlreadyReacted, AlreadyStarred, AppManagementAppNotInstalledOnOrg, AppMissingActionUrl, AsUserNotSupported, BadClientSecret, BadImage, BadRedirectUri, BadTimestamp, BadTitle, BadToken, BadUrl, BotNotFound, CannotAddBot, CannotAddOthers, CannotAddOthersRecurring, CannotAddSlackbot, CannotCompleteOthers, CannotCompleteRecurring, CannotCreateDialog, CannotFindChannel, CannotFindMessage, CannotFindService, CannotModifyPrimaryOwner, CannotParse, CannotParseAttachment, CannotPrompt, CannotResetPrimaryOwner, CannotUnfurlUrl, CannotUpdateAdminUser, CantArchiveGeneral, CantDelete, CantDeleteFile, CantDeleteMessage, CantInvite, CantInviteSelf, CantKickFromGeneral, CantKickSelf, CantLeaveGeneral, CantUpdateMessage, ChannelCannotBeUnshared, ChannelNotFound, ChannelNotSharedWithTeam, ChannelTypeNotSupported, ClientIdTokenMismatch, CodeAlreadyUsed, ComplianceExportsPreventDeletion, CouldNotCreateWorkspace, DefaultOrgWideChannel, DiscoverabilitySettingInvalid, DomainTaken, DuplicateChannelNotFound, DuplicateExternalId, DuplicateMessageNotFound, EditWindowClosed, EkmAccessDenied, EmojiNotFound, EnterpriseIsRestricted, ErrorBadFormat, ErrorBadNameI18n, ErrorBadUpload, ErrorBadWide, ErrorInvalidAlias, ErrorInvalidEmojiToRename, ErrorMissingName, ErrorNameTaken, ErrorNameTakenI18n, ErrorNoImage, ErrorTooBig, ExternalChannelMigrating, FailedLookingUpUser, FailedSendingDialog, FailedToAddEmoji, FailedToAliasEmoji, FailedToFetchActiveTeam, FailedToFetchInfo, FailedToRemoveUserFromWorkspace, FailedToRenameEmoji, FailedToSendInvite, FailedToSetDefaultChannels, FailedToSetDescription, FailedToSetDiscoverability, FailedToSetIcon, FailedToSetName, FailedToSetUserToAdmin, FailedToSetUserToOwner, FailedToSetUserToRegular, FailedToValidateCaller, FailedToValidateChannels, FailedToValidateCustomMessage, FailedToValidateExpiration, FailedToValidateTeam, FailureRemovingEmoji, FatalError, FeatureNotEnabled, FetchMembersFailed, FileCommentNotFound, FileDeleted, FileNotFound, FileNotShared, FileUnderReview, GroupContainsOthers, HashConflict, InvalidAppId, InvalidArgName, InvalidArguments, InvalidAuth, InvalidChannel, InvalidChannelId, InvalidCharset, InvalidClientId, InvalidCode, InvalidCursor, InvalidEmail, InvalidExternalId, InvalidFormData, InvalidGrantType, InvalidLimit, InvalidName, InvalidNameMaxlength, InvalidNamePunctuation, InvalidNameRequired, InvalidNameSpecials, InvalidPermissions, InvalidPostType, InvalidPresence, InvalidProfile, InvalidRequest, InvalidRequestId, InvalidRoleForUser, InvalidScheduledMessageId, InvalidScope, InvalidTargetTeam, InvalidTime, InvalidTimestamp, InvalidTrigger, InvalidTsLatest, InvalidTsOldest, InvalidTypes, InvalidUrl, InvalidUser, InvalidUsers, InvitedUserNotCreated, InvitedUserNotReactivated, InviteeCantSeeChannel, IsArchived, IsBot, IsInactive, LastMember, LimitRequired, MessageNotFound, MethodNotSupportedForChannelType, MigrationInProgress, MissingChannel, MissingDialog, MissingDuration, MissingPostType, MissingScope, MissingTrigger, MissingTs, MissingUnfurls, MixedScope, MsgTooLong, MustProvideTeamDomain, MustProvideTeamName, NameTaken, NameTakenInOrg, NoAliasSelected, NoBotUserForApp, NoChannel, NoImageUploaded, NoItemSpecified, NoPermission, NoReaction, NoSuchSubteam, NoText, NoUser, NoUserProvided, NotAdmin, NotAllowed, NotAllowedTokenType, NotAnAdmin, NotAppAdmin, NotArchived, NotAuthed, NotAuthorized, NotBearerToken, NotEnabled, NotEnoughUsers, NotEnterpriseTeam, NotFound, NotInChannel, NotInDnd, NotInGroup, NotPinnable, NotPinned, NotReactable, NotStarred, OauthAuthorizationUrlMismatch, OrgLoginRequired, OverPaginationLimit, PaginationNotAvailable, PaidOnly, PermissionDenied, PlanUpgradeRequired, PostingToGeneralChannelDenied, PreviewFeatureNotAvailable, ProfileSetFailed, PublicVideoNotAllowed, PushLimitReached, RateLimited, Ratelimited, RequestAlreadyResolved, RequestIdOrAppIdIsRequired, RequestIdRequiredForCustomIntegrations, RequestTimeout, ReservedName, RestrictedAction, RestrictedActionNonThreadableChannel, RestrictedActionReadOnlyChannel, RestrictedActionThreadOnlyChannel, RtmConnectRequired, SentRecently, SnoozeEndFailed, SnoozeFailed, SnoozeNotActive, TeamAddedToOrg, TeamNotFound, ThreadNotFound, TimeInPast, TimeTooFar, TokenRevoked, TooLarge, TooLong, TooManyAttachments, TooManyConvosForAppOnTeam, TooManyConvosForTeam, TooManyEmoji, TooManyFrames, TooManyIds, TooManyIdsProvided, TooManyReactions, TooManyTargetTeams, TooManyTeamsProvided, TooManyUsers, TriggerExchanged, TriggerExpired, UnableToLeaveLastTeam, UnknownMethod, UnknownType, UnsupportedArguments, UraMaxChannels, UserAlreadyDeleted, UserAlreadyTeamMember, UserDisabled, UserDoesNotOwnChannel, UserIsAlreadyDeleted, UserIsNotAGuest, UserIsRestricted, UserIsUltraRestricted, UserNotFound, UserNotInChannel, UserNotVisible, UserSessionResetFailed, 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