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.
| Class | Code | Meaning |
|---|---|---|
SdkError | SDK_ERROR | Base class for all SDK errors. Attributes: code: Stable, machine-readable error code (e.g. "CAPABILITY_DENIED"). |
CapabilityErrorSdkError | CAPABILITY_DENIED | Raised when a plugin calls an API it doesn't have capability for. |
RateLimitErrorSdkError | 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. |
DiscordApiErrorSdkError | 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). |
SdkPermissionErrorSdkError | BOT_MISSING_PERMISSION.permission | Raised when the bot lacks a required Discord permission. Attributes: permission: The missing permission name. |
ValidationErrorSdkError | VALIDATION_ERROR | Raised when input validation fails (e.g., invalid channel_id, empty key). |
KvQuotaErrorSdkError | KV_QUOTA_EXCEEDED | Raised when the KV key limit is exceeded. |
RpcErrorSdkError | RPC_ERROR | Raised 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. |
RpcTimeoutErrorSdkError | RPC_TIMEOUT | Raised 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.
| Code | Filed under |
|---|---|
BOT_MISSING_PERMISSION | Server setup |
CAPABILITY_DENIED | Server setup |
DISCORD_API_ERROR | Server setup |
KV_QUOTA_EXCEEDED | Platform limit |
QUOTA_EXCEEDED | Platform limit |
RATE_LIMITED | Platform limit |
VALIDATION_ERROR | Plugin bug |
WS_AUTH_FAILED | Platform limit |
WS_DISABLED | Platform limit |
WS_FRAME_TOO_LARGE | Platform limit |
WS_HOST_LIMIT | Platform limit |
WS_HOST_PRIVATE | Plugin bug |
WS_NOT_ADMIN | Plugin bug |
WS_NOT_INTERACTION | Plugin bug |
WS_NO_CONN | Platform limit |
WS_UNAVAILABLE | Platform limit |
YourBot docs
Reference tables are generated from the code that is running.
Ask in Discord
Suggest a correction