Errors
A refused call raises an error with a stable code, the HTTP status, a message and sometimes data. TypeScript and Python have one class per code, so a test can catch exactly the refusal it expects. In Rust a refusal is Error::Api { code, status, message, data }, and channelstack::codes has each code as a constant to compare code with. channelstack's own codes are below; after them, the codes the fakes refuse with where the real platform refuses the same request.
channelstack's codes#
action_requires#
HTTP 422. A live action needs a piece live mode doesn't drive yet (the browser actor beyond typing and clicking, proxy mode), or one this run lacks (a real person to create a channel, team or page as, a saved browser session). A test is skipped for it.
SDK class: ActionRequiresError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::ACTION_REQUIRES.
Most methods can return it.
cross_workspace_credential#
HTTP 400. A person's token belongs to a different workspace than the app's.
SDK class: CrossWorkspaceCredentialError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::CROSS_WORKSPACE_CREDENTIAL.
Most methods can return it.
fake_actor_in_live_world#
HTTP 409. A fake person acts in a live workspace.
SDK class: FakeActorInLiveWorldError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::FAKE_ACTOR_IN_LIVE_WORLD.
Most methods can return it.
internal#
HTTP 500. Something failed inside channelstack. The message says what.
SDK class: InternalError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::INTERNAL.
Most methods can return it.
invalid_argument#
HTTP 400. An argument is missing, or has the wrong type or shape.
SDK class: InvalidArgumentError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::INVALID_ARGUMENT.
Most methods can return it.
live_misconfigured#
HTTP 412. Live mode is set up wrong: credentials set in part, a token of the wrong kind, a person without a token under CHANNELSTACK_REALITY=live. A test fails for it, so a broken nightly run goes red.
SDK class: LiveMisconfiguredError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::LIVE_MISCONFIGURED.
Most methods can return it.
live_not_allowlisted#
HTTP 403. The live workspace, org or team isn't in its CHANNELSTACK_LIVE_* allowlist. Nothing was done there.
SDK class: LiveNotAllowlistedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::LIVE_NOT_ALLOWLISTED.
Most methods can return it.
not_found#
HTTP 404. The handle isn't there: it was removed, or belongs to another session.
SDK class: NotFoundError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::NOT_FOUND.
Most methods can return it.
session_not_found#
HTTP 404. The session was closed, or never existed.
SDK class: SessionNotFoundError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::SESSION_NOT_FOUND.
Most methods can return it.
unauthorized#
HTTP 401. The request has no valid bearer token: the one in server.json, or CHANNELSTACK_TOKEN.
SDK class: UnauthorizedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::UNAUTHORIZED.
Most methods can return it.
unsupported_in_fake#
HTTP 501. The operation isn't built in the fake yet.
SDK class: UnsupportedInFakeError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::UNSUPPORTED_IN_FAKE.
Raised by SlackFixture.createChannel().
unsupported_in_live#
HTTP 501. The operation has no live counterpart, or not yet: delivery chaos, a person's Re-run. A test is skipped for it.
SDK class: UnsupportedInLiveError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::UNSUPPORTED_IN_LIVE.
Most methods can return it.
Platform codes#
The fakes refuse what the real platform refuses. Where the platform has its own error code, such as Slack's not_in_channel, the fake refuses with it. Where the platform answers with an HTTP status and no code of its own, such as GitHub's 403 and 422, the code is channelstack's name for the refusal (forbidden, validation_failed).
account_inactive#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: AccountInactiveError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::ACCOUNT_INACTIVE.
Raised by SlackFixture.createUser(), SlackFixture.uninstallApp().
already_in_channel#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: AlreadyInChannelError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::ALREADY_IN_CHANNEL.
Raised by SlackUser.invite().
already_reacted#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: AlreadyReactedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::ALREADY_REACTED.
Raised by SlackApp.react(), SlackUser.react().
cannot_dm_bot#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: CannotDmBotError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::CANNOT_DM_BOT.
Raised by SlackApp.say().
cannot_edit_others_message#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: CannotEditOthersMessageError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::CANNOT_EDIT_OTHERS_MESSAGE.
Raised by DiscordUser.edit().
cannot_message_user#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: CannotMessageUserError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::CANNOT_MESSAGE_USER.
Raised by DiscordApp.say().
cant_delete_message#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: CantDeleteMessageError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::CANT_DELETE_MESSAGE.
Raised by SlackUser.delete().
cant_update_message#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: CantUpdateMessageError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::CANT_UPDATE_MESSAGE.
Raised by SlackUser.edit().
dispatch_failed#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: DispatchFailedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::DISPATCH_FAILED.
Raised by SlackUser.click(), SlackUser.select(), SlackUser.shortcut(), SlackUser.runCommand(), SlackModal.submit(), SlackModal.close().
empty_message#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: EmptyMessageError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::EMPTY_MESSAGE.
Raised by DiscordApp.say(), DiscordApp.reply(), DiscordUser.say(), DiscordUser.reply(), DiscordUser.edit().
forbidden#
The GitHub, Linear and Notion fakes refuse with it where the platform refuses the same request.
SDK class: ForbiddenError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::FORBIDDEN.
Raised by GitHubApp.push(), GitHubApp.openIssue(), GitHubApp.openPullRequest(), GitHubApp.editIssue(), GitHubApp.close(), GitHubApp.reopen(), GitHubApp.label(), GitHubApp.unlabel(), GitHubApp.assign(), GitHubApp.comment(), GitHubApp.edit(), GitHubApp.delete(), and 51 more.
invalid_auth#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: InvalidAuthError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::INVALID_AUTH.
Raised by SlackFixture.createUser().
invalid_form_body#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: InvalidFormBodyError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::INVALID_FORM_BODY.
Raised by DiscordApp.say(), DiscordApp.reply(), DiscordUser.say(), DiscordUser.reply(), DiscordUser.edit().
method_not_supported_for_channel_type#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: MethodNotSupportedForChannelTypeError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::METHOD_NOT_SUPPORTED_FOR_CHANNEL_TYPE.
Raised by SlackUser.invite(), SlackUser.kick().
missing_access#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: MissingAccessError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::MISSING_ACCESS.
Raised by DiscordApp.say(), DiscordApp.reply(), DiscordApp.react(), DiscordApp.unreact(), DiscordUser.say(), DiscordUser.reply().
missing_permissions#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: MissingPermissionsError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::MISSING_PERMISSIONS.
Raised by DiscordApp.say(), DiscordApp.reply(), DiscordApp.react(), DiscordApp.unreact(), DiscordUser.say(), DiscordUser.reply(), DiscordUser.delete(), DiscordUser.react(), DiscordUser.unreact(), DiscordUser.startThread(), DiscordUser.invite(), DiscordUser.runCommand().
msg_too_long#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: MsgTooLongError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::MSG_TOO_LONG.
Raised by SlackApp.say(), SlackApp.reply(), SlackUser.say(), SlackUser.reply().
name_taken#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: NameTakenError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::NAME_TAKEN.
Raised by SlackFixture.createChannel().
no_reaction#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: NoReactionError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::NO_REACTION.
Raised by SlackApp.unreact(), SlackUser.unreact().
no_text#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: NoTextError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::NO_TEXT.
Raised by SlackApp.say(), SlackApp.reply(), SlackUser.say(), SlackUser.reply(), SlackUser.edit().
not_allowed#
The GitHub fake refuses with it where the platform refuses the same request.
SDK class: NotAllowedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::NOT_ALLOWED.
Raised by GitHubApp.merge(), GitHubUser.merge().
not_in_channel#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: NotInChannelError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::NOT_IN_CHANNEL.
Raised by SlackApp.say(), SlackApp.reply(), SlackApp.react(), SlackApp.unreact(), SlackUser.say(), SlackUser.reply(), SlackUser.edit(), SlackUser.delete(), SlackUser.click(), SlackUser.select(), SlackUser.shortcut(), SlackUser.runCommand(), and 7 more.
object_not_found#
The Notion fake refuses with it where the platform refuses the same request.
SDK class: ObjectNotFoundError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::OBJECT_NOT_FOUND.
Raised by NotionIntegration.comment(), NotionIntegration.reply(), NotionIntegration.edit(), NotionIntegration.rename().
restricted_resource#
The Notion fake refuses with it where the platform refuses the same request.
SDK class: RestrictedResourceError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::RESTRICTED_RESOURCE.
Raised by NotionIntegration.comment(), NotionIntegration.reply(), NotionIntegration.edit(), NotionIntegration.rename().
split_view_unavailable#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: SplitViewUnavailableError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::SPLIT_VIEW_UNAVAILABLE.
Raised by SlackUser.openAgentThread(), SlackUser.switchContext().
stop_unavailable#
The Slack fake refuses with it where the platform refuses the same request.
SDK class: StopUnavailableError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::STOP_UNAVAILABLE.
Raised by SlackUser.stop().
thread_already_created#
The Discord fake refuses with it where the platform refuses the same request.
SDK class: ThreadAlreadyCreatedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::THREAD_ALREADY_CREATED.
Raised by DiscordUser.startThread().
validation_error#
The Notion fake refuses with it where the platform refuses the same request.
SDK class: ValidationErrorError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::VALIDATION_ERROR.
Raised by NotionIntegration.comment(), NotionIntegration.reply(), NotionIntegration.edit(), NotionIntegration.rename().
validation_failed#
The GitHub fake refuses with it where the platform refuses the same request.
SDK class: ValidationFailedError in TypeScript and Python, a subclass of ChannelstackError. Rust: Error::Api { code, .. } with code equal to codes::VALIDATION_FAILED.
Raised by GitHubApp.openIssue(), GitHubApp.openPullRequest(), GitHubApp.close(), GitHubApp.reopen(), GitHubApp.assign(), GitHubApp.review(), GitHubApp.reviewComment(), GitHubApp.requestReview(), GitHubApp.markReady(), GitHubUser.openIssue(), GitHubUser.openPullRequest(), GitHubUser.close(), and 8 more.