TestErrorMessageBudgetExhausted: 402 produces the depleted hint pointing users at the top-up page rather than a stack-trace style wrap.
(t *testing.T)
| 1469 | } |
| 1470 | if strings.Contains(msg, "ollama") { |
| 1471 | t.Fatalf("error should be backend-neutral (no 'ollama'): %q", msg) |
| 1472 | } |
| 1473 | } |
| 1474 | |
| 1475 | // TestErrorMessageUnauthorized: 401 names the rejected key and the exact |
| 1476 | // config path so the user can fix it without guessing. |
| 1477 | func TestErrorMessageUnauthorized(t *testing.T) { |
| 1478 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 1479 | msg := m.errorMessage(llm.Event{Err: cloud.ErrUnauthorized}) |
| 1480 | if !strings.Contains(msg, "key rejected") { |
| 1481 | t.Fatalf("401 error should say 'key rejected': %q", msg) |
| 1482 | } |
| 1483 | if !strings.Contains(msg, "models."+m.cfg.Active+".key") { |
nothing calls this directly
no test coverage detected