@@ -446,12 +446,12 @@ describe("analyze_issue_with_seer", () => {
446446 detail :
447447 "Your organization does not have enough credits to start an Autofix run." ,
448448 } ,
449- "Your organization does not have enough credits to start an Autofix run." ,
449+ "Your organization does not have enough credits to start an Autofix run. Someone with billing access can turn on auto-reload in Sentry. " ,
450450 ] ,
451451 [
452452 "out of quota" ,
453453 "No budget for Seer Autofix." ,
454- "Your organization does not have enough Seer budget to start an analysis ." ,
454+ "Your organization does not have enough Seer quota to start an Autofix run ." ,
455455 ] ,
456456 ] ) (
457457 "explains why the run did not start when Sentry answers 402 (%s)" ,
@@ -494,6 +494,42 @@ describe("analyze_issue_with_seer", () => {
494494 } ,
495495 ) ;
496496
497+ it ( "explains a run that stopped because the org ran out of credits" , async ( ) => {
498+ mswServer . use (
499+ http . get (
500+ "https://sentry.io/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-CREDITS/autofix/" ,
501+ ( ) =>
502+ HttpResponse . json ( {
503+ autofix : {
504+ run_id : 456 ,
505+ status : "error" ,
506+ failure_reason : "out_of_credits" ,
507+ blocks : [ ] ,
508+ } ,
509+ } ) ,
510+ ) ,
511+ ) ;
512+
513+ const result = await analyzeIssueWithSeer . handler (
514+ {
515+ organizationSlug : "sentry-mcp-evals" ,
516+ regionUrl : null ,
517+ issueId : "CLOUDFLARE-MCP-CREDITS" ,
518+ instruction : undefined ,
519+ } ,
520+ {
521+ constraints : { organizationSlug : undefined } ,
522+ accessToken : "access-token" ,
523+ userId : "1" ,
524+ } ,
525+ ) ;
526+
527+ expect ( result ) . toContain ( "## Analysis Failed" ) ;
528+ expect ( result ) . toContain (
529+ "Your organization does not have enough credits to continue your Autofix run. Someone with billing access can turn on auto-reload in Sentry." ,
530+ ) ;
531+ } ) ;
532+
497533 it ( "returns unsupported message for metric issues without calling Seer" , async ( ) => {
498534 let autofixRequests = 0 ;
499535
0 commit comments