File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export class APIError extends PromptFoundryError {
4949 headers : Headers | undefined ,
5050 ) {
5151 if ( ! status ) {
52- return new APIConnectionError ( { cause : castToError ( errorResponse ) } ) ;
52+ return new APIConnectionError ( { message , cause : castToError ( errorResponse ) } ) ;
5353 }
5454
5555 const error = errorResponse as Record < string , any > ;
@@ -101,7 +101,7 @@ export class APIUserAbortError extends APIError {
101101export class APIConnectionError extends APIError {
102102 override readonly status : undefined = undefined ;
103103
104- constructor ( { message, cause } : { message ?: string ; cause ?: Error | undefined } ) {
104+ constructor ( { message, cause } : { message ?: string | undefined ; cause ?: Error | undefined } ) {
105105 super ( undefined , undefined , message || 'Connection error.' , undefined ) ;
106106 // in some environments the 'cause' property is already declared
107107 // @ts -ignore
You can’t perform that action at this time.
0 commit comments