에러 처리

에러 category·code 표 — 분기는 code 와 category 로만 한다

에러가 나면 SDK 는 category(큰 분류)·code(세부 종류)·status·requestId·retryable 를 담은 에러 객체를 줘요. 분기는 codecategory 로만 해요. message 문구는 예고 없이 바뀌어요. 자세한 약속은 클라이언트 정책에 있어요.

validation — 400 · 요청 형식·값 오류

codestatusretryable
action_invalid400
bad_request400
build_env_no_override400
cross_tenant400
duplicate400
empty400
expiry_in_past400
final_visibility_too_wide400
invalid_drive400
invalid_entitlement400
invalid_expiry400
invalid_format400
invalid_oauth_state400
invalid_value400
kind_engine_mismatch400
not_allowed400
oauth_denied400
preset_mismatch400
required400
too_long400

unauthenticated — 401 · 토큰 부재·만료·무효

codestatusretryable
session_ended401
session_expired401
token_expired401
token_invalid401
token_missing401

CategoryPaymentRequired — 402 · 결제·플랜·쿼터

codestatusretryable
charge_failed402
no_billing_key402
no_payment_method402
payment_failed402
payment_required402
preset_not_in_plan402
quota_exceeded402
resource_quota_exceeded402
seat_unassigned402
unpaid_balance402

permission_denied — 403 · 권한 없음

codestatusretryable
action_denied403
connector_inactive403
feature_not_in_plan403
forbidden403
grant_expired403
grant_revoked403
not_admin403
not_member403
version_not_approved403

not_found — 404·410 · 리소스 없음·만료

codestatusretryable
invitation_expired410
link_invalid404
no_active_grant404
not_found404
permanently_deleted410
unknown_plan404

conflict — 409 · 상태 충돌·중복

codestatusretryable
already_accessed409
already_active409
already_deleted409
already_exists409
already_inactive409
already_member409
already_promoted409
already_revoked409
already_settled409
already_suspended409
already_terminal409
app_unavailable409
cannot_reactivate409
conflict409
domain_taken409
exceeds_max409
grant_already_terminal409
grant_conflict409
invalid_state_transition409
invalid_target409
last_admin409
no_available_seat409
not_deleted409
not_deployed409
not_suspended409
pending_exists409
plan_version_exists409
preset_in_use409
schema_name_taken409
seat_in_use409
seats_not_supported409
slug_taken409
staging_already_enabled409
static_release_in_use409
unsupported_for_static_app409
visibility_widen_not_allowed409

precondition_failed — 412·422 · 선행 조건 미충족

codestatusretryable
confirm_required412
domain_blocked422
not_promotable412
pending_review_exists412
precondition_failed412
prod_deploy_required412
promote_in_progress412
staging_mismatch412
staging_not_enabled412
staging_required412
static_release_not_ready412

unavailable — 429·503 · 일시 불가·rate limit

codestatusretryable
auth_expired503
github_device_flow_disabled503
temporarily_unavailable429

internal — 500 · 서버 내부 오류

codestatusretryable
internal_error500