TestErrorMessageBudgetExhausted: 402 produces the depleted hint pointing users at the top-up page rather than a stack-trace style wrap.
(t *testing.T)
| 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. |
| 1482 | func TestErrorMessageUnauthorized(t *testing.T) { |
| 1483 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
nothing calls this directly
no test coverage detected