Skip to content

SDK Errors ​

VibeLands uses stable, JSON-safe SDK error codes. Code compares against code, not human-readable message; messages may become clearer without changing the contract. The canonical registry is @vibelands/mod-sdk/shared:

ts
import {
  ModSdkError,
  MOD_SDK_ERRORS,
  isModSdkErrorShape,
} from '@vibelands/mod-sdk/shared';

Every wire-safe envelope has code, message, and the registry-defined retryable flag. It may also carry operationId and non-sensitive JSON details. Stack traces, database errors, secrets, and private host internals are never part of the public envelope.

CodeMeaningRetryable
VB_SDK_PERMISSION_DENIEDRequired capability was not grantedno
VB_SDK_VALIDATION_FAILEDInput, schema, payload, or identifier is invalidno
VB_SDK_QUOTA_EXCEEDEDResource or byte quota is exhaustedno
VB_SDK_RATE_LIMITEDCurrent rate budget was exceededyes
VB_SDK_NOT_FOUNDScoped resource is absent or not visibleno
VB_SDK_NOT_OWNEDResource is outside the mod's ownership scopeno
VB_SDK_CONFLICTState, revision, or lease conflictsyes
VB_SDK_UNAVAILABLECapability/backing service is temporarily unavailableyes
VB_SDK_PROTOCOL_MISMATCHCaller and host contracts are incompatibleno
VB_SDK_INTERNALSanitized unexpected host failureyes

Existing API v2 boolean/null methods retain their compatibility behavior. New command/query surfaces return or throw these structured errors; Creator includes the exact installed registry in both JSON and agent Markdown context.

VibeLands Creator · Runtime API v2