{"record":{"id":"530e7ce722015b22","repo":"paperclipai/paperclip","slug":"missing-issue-id-530e7c","errorCode":null,"errorMessage":"Missing issue id","messagePattern":"Missing issue id","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/src/hooks/useRetryNowMutation.ts","lineNumber":41,"sourceCode":"\nexport const RETRY_NOW_OUTCOME_HEADLINE: Record<IssueRetryNowOutcome, string> = {\n  promoted: \"Retry promoted\",\n  already_promoted: \"Retry already running\",\n  no_scheduled_retry: \"No scheduled retry\",\n  gate_suppressed: \"Couldn't retry now\",\n};\n\nexport function useRetryNowMutation(\n  issueId: string | null | undefined,\n): UseMutationResult<IssueRetryNowResponse, unknown, void, unknown> & {\n  lastError: RetryNowError | null;\n} {\n  const queryClient = useQueryClient();\n  const { pushToast } = useToastActions();\n\n  const mutation = useMutation({\n    mutationFn: () => {\n      if (!issueId) throw new Error(\"Missing issue id\");\n      return issuesApi.retryScheduledRetryNow(issueId);\n    },\n    onSuccess: (response) => {\n      if (issueId) {\n        queryClient.invalidateQueries({ queryKey: queryKeys.issues.detail(issueId) });\n        queryClient.invalidateQueries({ queryKey: queryKeys.issues.activity(issueId) });\n        queryClient.invalidateQueries({ queryKey: queryKeys.issues.runs(issueId) });\n        queryClient.invalidateQueries({ queryKey: queryKeys.issues.liveRuns(issueId) });\n        queryClient.invalidateQueries({ queryKey: queryKeys.issues.activeRun(issueId) });\n      }\n      if (response.outcome === \"promoted\") {\n        pushToast({\n          title: RETRY_NOW_OUTCOME_HEADLINE.promoted,\n          body: response.message,\n          tone: \"success\",\n        });\n      } else if (response.outcome === \"gate_suppressed\") {\n        pushToast({","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/hooks/useRetryNowMutation.ts#L23-L59","documentation":"UI retry-now guard: the mutation ran while issueId was null/undefined, so there is no issue to promote a retry for. The guard throws inside mutationFn before any API call; callers should only mount/trigger the retry action from an issue-scoped context.","triggerScenarios":"Thrown at ui/src/hooks/useRetryNowMutation.ts:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure an issue id is set before triggering the retry-now mutation; reload the issue if it is missing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}