fix(cli): say the approval window closed instead of reporting a raw 410 - #283
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
상위 이슈: 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