File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export const BedrockGetBatchOutputRequestHandler = async ({
5151 c : Context ;
5252 providerOptions : Options ;
5353 requestURL : string ;
54- } ) => {
54+ } ) : Promise < Response > => {
5555 try {
5656 // get s3 file id from batch details
5757 // get file from s3
@@ -79,7 +79,7 @@ export const BedrockGetBatchOutputRequestHandler = async ({
7979
8080 if ( ! retrieveBatchesResponse . ok ) {
8181 const error = await retrieveBatchesResponse . text ( ) ;
82- return generateErrorResponse (
82+ const _response = generateErrorResponse (
8383 {
8484 message : error ,
8585 type : null ,
@@ -88,6 +88,13 @@ export const BedrockGetBatchOutputRequestHandler = async ({
8888 } ,
8989 BEDROCK
9090 ) ;
91+
92+ return new Response ( JSON . stringify ( _response ) , {
93+ status : 500 ,
94+ headers : {
95+ 'Content-Type' : 'application/json' ,
96+ } ,
97+ } ) ;
9198 }
9299
93100 const batchDetails : BedrockGetBatchResponse =
You can’t perform that action at this time.
0 commit comments