@@ -513,12 +513,17 @@ describe('POST /api/resume/[workflowId]/[executionId]/[contextId]', () => {
513513 } )
514514
515515 it . each ( [
516- { statusCode : 402 , message : 'Member usage limit reached' , retryable : false } ,
517- { statusCode : 429 , message : 'Target concurrency full' , retryable : true } ,
518- { statusCode : 503 , message : 'Usage admission unavailable' , retryable : true } ,
516+ { statusCode : 402 , message : 'Member usage limit reached' , retryable : false , body : undefined } ,
517+ { statusCode : 429 , message : 'Target concurrency full' , retryable : true , body : undefined } ,
518+ {
519+ statusCode : 503 ,
520+ message : 'Usage admission unavailable' ,
521+ retryable : true ,
522+ body : 'Internal server error' ,
523+ } ,
519524 ] ) (
520525 'leaves the pause and queued input untouched when readmission returns $statusCode' ,
521- async ( { statusCode, message, retryable } ) => {
526+ async ( { statusCode, message, retryable, body } ) => {
522527 mockPreprocessExecution . mockResolvedValueOnce ( {
523528 success : false ,
524529 error : { statusCode, message, retryable } ,
@@ -528,7 +533,7 @@ describe('POST /api/resume/[workflowId]/[executionId]/[contextId]', () => {
528533 const response = await POST ( request , context )
529534
530535 expect ( response . status ) . toBe ( statusCode )
531- expect ( await response . json ( ) ) . toEqual ( { error : message } )
536+ expect ( await response . json ( ) ) . toEqual ( { error : body ?? message } )
532537 expect ( mockEnqueueOrStartResume ) . not . toHaveBeenCalled ( )
533538 }
534539 )
@@ -543,7 +548,7 @@ describe('POST /api/resume/[workflowId]/[executionId]/[contextId]', () => {
543548
544549 expect ( response . status ) . toBe ( 500 )
545550 expect ( await response . json ( ) ) . toEqual ( {
546- error : 'Paused execution billing attribution is missing or invalid ' ,
551+ error : 'Internal server error ' ,
547552 } )
548553 expect ( mockPreprocessExecution ) . not . toHaveBeenCalled ( )
549554 expect ( mockEnqueueOrStartResume ) . not . toHaveBeenCalled ( )
@@ -576,7 +581,7 @@ describe('POST /api/resume/[workflowId]/[executionId]/[contextId]', () => {
576581
577582 expect ( response . status ) . toBe ( 500 )
578583 expect ( await response . json ( ) ) . toEqual ( {
579- error : 'Paused execution billing attribution does not match its workspace or actor ' ,
584+ error : 'Internal server error ' ,
580585 } )
581586 expect ( mockPreprocessExecution ) . not . toHaveBeenCalled ( )
582587 expect ( mockEnqueueOrStartResume ) . not . toHaveBeenCalled ( )
@@ -593,7 +598,7 @@ describe('POST /api/resume/[workflowId]/[executionId]/[contextId]', () => {
593598
594599 expect ( response . status ) . toBe ( 500 )
595600 expect ( await response . json ( ) ) . toEqual ( {
596- error : 'Paused execution snapshot does not match the requested workflow or execution ' ,
601+ error : 'Internal server error ' ,
597602 } )
598603 expect ( mockPreprocessExecution ) . not . toHaveBeenCalled ( )
599604 expect ( mockEnqueueOrStartResume ) . not . toHaveBeenCalled ( )
0 commit comments