ApiErrorCode:
| "INVALID_REQUEST"
| "METHOD_NOT_FOUND"
| "INTERNAL_ERROR"
| "REQUIRED_PARAM"
| "INVALID_PARAMS"
| "INVALID_INDEX"
| "NOT_FOUND"
| "LOCKED"
| "NOT_SUPPORTED"
| "PANEL_MODE_UNSUPPORTED"
| "LIBRARY_DISABLED"
| "NO_ACTIVE_ITEM"
| "CONFLICT"
| "NOT_OWNER"
| "OPERATION_FAILED"
| "CANCELLED"
| "TIMEOUT"
| "PERMISSION_DENIED"
| "ORIGIN_DENIED"
| "MISSING_PATH"
| "INVALID_PATH"
| "INVALID_HANDLE"
| "NO_INFO"
| "DECODER_FAILED"
| "DECODE_FAILED"
| "UNKNOWN_ERROR"
| "EXCEPTION"
| "MENU_ITEM_DISABLED"
| "MENU_MATCH_AMBIGUOUS"
| "MENU_COMMAND_NOT_FOUND"
| "PORT_NOT_FOUND"
| "TARGET_NOT_FOUND"
| string & {}
Unified error code enumeration.
Every API failure (sync or async) reports a
codevalue drawn from this enumeration. Naming convention isUPPER_SNAKE_CASEso the value is machine-readable.The trailing
(string & {})branch is the canonical TypeScript escape hatch for "any other string"; it allows third-party plugins to report custom codes without losing the literal-completion benefits for the shipped values.