MCPcopy Index your code
hub / github.com/larksuite/cli / TestLookupCodeMeta_ConfigCode_99991543

Function TestLookupCodeMeta_ConfigCode_99991543

internal/errclass/codemeta_test.go:146–160  ·  view source on GitHub ↗

TestLookupCodeMeta_ConfigCode_99991543 pins the Lark "app_id or app_secret is incorrect" code to CategoryConfig / SubtypeInvalidClient. The CLI cannot retry around a wrong app credential — the operator has to edit the local config — so this MUST stay non-retryable and live in the config category (no

(t *testing.T)

Source from the content-addressed store, hash-verified

144// config — so this MUST stay non-retryable and live in the config category
145// (not the API category it was originally classed under).
146func TestLookupCodeMeta_ConfigCode_99991543(t *testing.T) {
147 meta, ok := LookupCodeMeta(99991543)
148 if !ok {
149 t.Fatal("99991543 not registered in codeMeta")
150 }
151 if meta.Category != errs.CategoryConfig {
152 t.Errorf("category = %v, want %v", meta.Category, errs.CategoryConfig)
153 }
154 if meta.Subtype != errs.SubtypeInvalidClient {
155 t.Errorf("subtype = %v, want %v", meta.Subtype, errs.SubtypeInvalidClient)
156 }
157 if meta.Retryable {
158 t.Errorf("Retryable = true, want false (wrong app credential is operator-fix)")
159 }
160}
161
162func TestLookupCodeMeta_PolicyChallengeRequired(t *testing.T) {
163 got, ok := LookupCodeMeta(21000)

Callers

nothing calls this directly

Calls 1

LookupCodeMetaFunction · 0.85

Tested by

no test coverage detected