Skip to content

fix(cli): say the approval window closed instead of reporting a raw 410 - #283

Merged
kcrmin merged 1 commit into
developfrom
fix/device-login-expiry-message
Aug 10, 2026
Merged

fix(cli): say the approval window closed instead of reporting a raw 410#283
kcrmin merged 1 commit into
developfrom
fix/device-login-expiry-message

Conversation

@kcrmin

@kcrmin kcrmin commented Aug 10, 2026

Copy link
Copy Markdown
Member

상위 이슈: Idea2Strategy/Idea2Strategy#479

무엇을 고치나

login --browser 는 10분 동안 승인을 기다린다. 아무도 승인하지 않으면 서버가 410 으로 만료를
알리는데, CLI 가 그것을 그대로 표면화해 이렇게 나왔다:

{"ok":false,"command":"login","error":{"code":"REQUEST_REJECTED","message":"Idea2Strategy API rejected the request","status":410}}

결함처럼 읽힌다. 실제로 이 세션에서 이 출력을 보고 타임스탬프 바인딩 버그를 의심해 시간을
썼다. 서버는 약속대로 동작했고, 답은 언제나 "다시 로그인하라" 하나다.

{"ok":false,"command":"login","error":{"code":"DEVICE_AUTHORIZATION_EXPIRED","message":"The approval window closed before the code was confirmed. Run login again."}}

exit 5 는 유지한다 — 전송 문제가 아니라 사유에 따른 거절이고, 만료가 바로 그것이다.

검증

:apps:idea2strategy-cli:test 통과. 만료를 돌려주는 스텁에 대해 exit 5 와
DEVICE_AUTHORIZATION_EXPIRED, 그리고 "Run login again" 문구를 단언하는 테스트를 추가했다.

🤖 Generated with Claude Code

A device request nobody confirms expires on schedule, which is the request doing what
it promised. Surfacing the server's 410 as "REQUEST_REJECTED ... status 410" reads
like a fault and sends whoever is looking at it hunting for one — it cost time in this
session. The answer is always the same: run login again, so the CLI says that.

Exit 5 keeps its contract meaning, a refusal on the merits rather than a transport
problem, which is what an expiry is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kcrmin
kcrmin merged commit cb90a5e into develop Aug 10, 2026
2 checks passed
@kcrmin
kcrmin deleted the fix/device-login-expiry-message branch August 10, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant