File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ area : webapp
3+ type : improvement
4+ ---
5+
6+ Downgrade two expected, non-failure conditions from ` error ` to ` warn ` so they
7+ stop firing as Sentry errors:
8+
9+ - Checkpoint restore when a RESTORE event already exists (benign idempotency
10+ skip on a duplicate/retried event).
11+ - Token endpoint when the authorization code is invalid/expired, which is the
12+ expected steady state while the CLI polls during login. Genuinely unexpected
13+ failures still log at ` error ` .
Original file line number Diff line number Diff line change @@ -37,10 +37,15 @@ export async function action({ request }: ActionFunctionArgs) {
3737 return json ( responseJson ) ;
3838 } catch ( error ) {
3939 if ( error instanceof Error ) {
40- logger . error ( "Error getting PersonalAccessToken from AuthorizationCode" , {
41- url : request . url ,
42- error : error . message ,
43- } ) ;
40+ // The CLI polls this endpoint while the user completes login, so an
41+ // invalid/expired code is the expected steady state, not an error.
42+ const expected = error . message === "Invalid authorization code, or code expired" ;
43+ const fields = { url : request . url , error : error . message } ;
44+ if ( expected ) {
45+ logger . warn ( "Error getting PersonalAccessToken from AuthorizationCode" , fields ) ;
46+ } else {
47+ logger . error ( "Error getting PersonalAccessToken from AuthorizationCode" , fields ) ;
48+ }
4449
4550 return json ( { error : error . message } , { status : 400 } ) ;
4651 }
Original file line number Diff line number Diff line change @@ -82,7 +82,9 @@ export class RestoreCheckpointService extends BaseService {
8282 } ) ;
8383
8484 if ( restoreEvent ) {
85- logger . error ( "Restore event already exists" , {
85+ // Idempotency guard: the restore already happened (duplicate/retried
86+ // event). This is a benign skip, not a failure.
87+ logger . warn ( "Restore event already exists" , {
8688 runId : checkpoint . runId ,
8789 attemptId : checkpoint . attemptId ,
8890 checkpointId : checkpoint . id ,
You can’t perform that action at this time.
0 commit comments