Docs / Developers / Referência / Errors and who fixes them
GeneratedSDK 0.10.1

Errors and who fixes them

The SDK exception classes, their codes, and which party a rejection points at.

Exception classes

Catch SdkError and branch on e.code, or catch a subclass. Every class is importable from yourbot_sdk.

ClassCódigoSignificado
SdkErrorSDK_ERRORBase class for all SDK errors. Attributes: code: Stable, machine-readable error code (e.g. "CAPABILITY_DENIED").
CapabilityError
SdkError
CAPABILITY_DENIEDRaised when a plugin calls an API it doesn't have capability for.
RateLimitError
SdkError
RATE_LIMITED
.retry_after
Raised when a quota/rate limit is exceeded. Attributes: retry_after: Suggested seconds to wait before retrying. code: "RATE_LIMITED" for per-second limits or "QUOTA_EXCEEDED" for exhausted tenant quotas.
DiscordApiError
SdkError
DISCORD_API_ERROR
.status_code
Raised when the Discord REST API returns an error. Attributes: status_code: The HTTP status code from Discord (e.g., 403, 404).
SdkPermissionError
SdkError
BOT_MISSING_PERMISSION
.permission
Raised when the bot lacks a required Discord permission. Attributes: permission: The missing permission name.
ValidationError
SdkError
VALIDATION_ERRORRaised when input validation fails (e.g., invalid channel_id, empty key).
KvQuotaError
SdkError
KV_QUOTA_EXCEEDEDRaised when the KV key limit is exceeded.
RpcError
SdkError
RPC_ERRORRaised when the host returns an error the SDK cannot map to a more specific exception type. Also subclasses RuntimeError because unmapped host errors were raised as bare RuntimeError in earlier releases — existing except RuntimeError handlers keep working.
RpcTimeoutError
SdkError
RPC_TIMEOUTRaised when an RPC call times out.

Kept for older plugins: PermissionError, TimeoutError.

Who fixes what

When the platform rejects a call, the dashboard's reliability panel files it under one of three owners so a server owner knows whether to contact you, change their server or wait for a limit to reset.

CódigoFiled under
BOT_MISSING_PERMISSIONServer setup
CAPABILITY_DENIEDServer setup
DISCORD_API_ERRORServer setup
KV_QUOTA_EXCEEDEDPlatform limit
QUOTA_EXCEEDEDPlatform limit
RATE_LIMITEDPlatform limit
VALIDATION_ERRORPlugin bug
WS_AUTH_FAILEDPlatform limit
WS_DISABLEDPlatform limit
WS_FRAME_TOO_LARGEPlatform limit
WS_HOST_LIMITPlatform limit
WS_HOST_PRIVATEPlugin bug
WS_NOT_ADMINPlugin bug
WS_NOT_INTERACTIONPlugin bug
WS_NO_CONNPlatform limit
WS_UNAVAILABLEPlatform limit
YourBot docs Reference tables are generated from the code that is running. Ask in Discord Suggest a correction