MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestErrorMessageBudgetExhausted

Function TestErrorMessageBudgetExhausted

internal/tui/tui_test.go:1471–1480  ·  view source on GitHub ↗

TestErrorMessageBudgetExhausted: 402 produces the depleted hint pointing users at the top-up page rather than a stack-trace style wrap.

(t *testing.T)

Source from the content-addressed store, hash-verified

1469 if !strings.Contains(msg, m.cfg.ActiveProfile().URL) {
1470 t.Fatalf("error must include the configured URL: %q", msg)
1471 }
1472 if !strings.Contains(msg, "/models") {
1473 t.Fatalf("error must hint at /models: %q", msg)
1474 }
1475 if strings.Contains(msg, "ollama") {
1476 t.Fatalf("error should be backend-neutral (no 'ollama'): %q", msg)
1477 }
1478}
1479
1480// TestErrorMessageUnauthorized: 401 names the rejected key and the exact
1481// config path so the user can fix it without guessing.
1482func TestErrorMessageUnauthorized(t *testing.T) {
1483 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})

Callers

nothing calls this directly

Calls 2

newTestModelFunction · 0.85
errorMessageMethod · 0.80

Tested by

no test coverage detected