@@ -38,7 +38,10 @@ export class DeepSeekRequestError extends Error {
3838 readonly diagnosticMessage : string ;
3939 readonly baseUrl ?: string ;
4040 readonly status ?: number ;
41+ readonly statusText ?: string ;
4142 readonly code ?: string ;
43+ readonly serverMessage ?: string ;
44+ readonly responseText ?: string ;
4245
4346 constructor ( options : {
4447 message : string ;
@@ -47,7 +50,10 @@ export class DeepSeekRequestError extends Error {
4750 diagnosticMessage ?: string ;
4851 baseUrl ?: string ;
4952 status ?: number ;
53+ statusText ?: string ;
5054 code ?: string ;
55+ serverMessage ?: string ;
56+ responseText ?: string ;
5157 cause ?: unknown ;
5258 } ) {
5359 super ( options . message , { cause : options . cause } ) ;
@@ -57,7 +63,10 @@ export class DeepSeekRequestError extends Error {
5763 this . diagnosticMessage = options . diagnosticMessage ?? options . message ;
5864 this . baseUrl = options . baseUrl ;
5965 this . status = options . status ;
66+ this . statusText = options . statusText ;
6067 this . code = options . code ;
68+ this . serverMessage = options . serverMessage ;
69+ this . responseText = options . responseText ;
6170 }
6271}
6372
@@ -79,7 +88,10 @@ export async function createHttpError(
7988 kind : 'http' ,
8089 baseUrl,
8190 status : response . status ,
91+ statusText : response . statusText ,
8292 code : `HTTP_${ response . status } ` ,
93+ serverMessage,
94+ responseText,
8395 diagnosticMessage : joinDiagnosticParts (
8496 `kind=http` ,
8597 `status=${ response . status } ` ,
0 commit comments