agent window: plain message when the endpoint wants a key
Deploy web Studio / deploy (push) Successful in 3m16s

A 401/403 with an HTML error page (nginx) showed as "HTTP 401: 401
Authorization Required 401 Authorization Required nginx". Now: "The endpoint
wants an API key: enter it in ⚙" before one is set, "The endpoint refused
the API key (...)" after.
This commit is contained in:
grabowski committed 2026-10-23 19:57:29 +07:00
1 parent 41554801ea
commit 36f7a9f440
2 files changed
+9 -3

No files matched your search

+2 -1
View File
@@ -121,7 +121,8 @@ def run(pg, objects, shot, check, can_set_key):
settings()
pg.locator("#agkey").fill("wrong-key")
save()
check("401" in pg.locator("#agsetmsg").inner_text(), "a wrong key shows the endpoint's refusal: " + pg.locator("#agsetmsg").inner_text())
check("refused the API key" in pg.locator("#agsetmsg").inner_text() and "invalid api key" in pg.locator("#agsetmsg").inner_text(),
"a wrong key shows the endpoint's refusal: " + pg.locator("#agsetmsg").inner_text())
check(pg.locator("#agwho .ag-off").count() == 1, "the status dot turns red")
shot("agent-badkey.jpg")
pg.locator("#agkey").fill("test-key")