Parity with magpie's built-ins: a failed sign-in says why, CLI-backed Command Code and Devin accounts follow the CLI's key, Factory's refused renewal is a 401 in the caller's API shape
- every {type:"failed"} carries an error reason magpie shows
- commandcode/devin: accounts taken from the CLI are marked metadata.cli and re-read its credentials on each request, usage and models
- factory: a refused refresh answers 401 authentication_error (Anthropic shape on /llm/a/, OpenAI's elsewhere) instead of throwing; the whoami back-off is per account; 403 hints name the account to sign in again
- versions: factory/devin/commandcode/cursor/kiro/mimo/zed/zcode 0.1.2, workbuddy 0.1.3
This commit is contained in:
@@ -124,3 +124,10 @@ test("the desktop's sign-in is renewed in memory only", async () => {
|
||||
await usageOf(WorkBuddyAuthPlugin, auth, client)
|
||||
expect(calls.filter((c) => c.url.pathname.endsWith("/refresh")).length).toBe(1)
|
||||
})
|
||||
|
||||
test("a desktop sign-in with the app signed out says why it failed", async () => {
|
||||
const p = await WorkBuddyAIAuthPlugin({ client: {} })
|
||||
const m = p.auth.methods.find((x) => x.label.endsWith("desktop's sign-in"))
|
||||
const r = await (await m.authorize()).callback()
|
||||
expect(r).toEqual({ type: "failed", error: "WorkBuddy AI desktop isn't signed in" })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user