Skip to content

Commit 448c93f

Browse files
committed
fix: add missing error.param field to chat error responses
1 parent 9cdb64b commit 448c93f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export function serializeErrorResponse(response: ErrorResponse): string {
172172
error: {
173173
message: response.error.message,
174174
type: response.error.type ?? "server_error",
175+
param: response.error.param ?? null,
175176
code: response.error.code ?? null,
176177
},
177178
});

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export interface ContentWithToolCallsResponse extends ResponseOverrides {
165165
}
166166

167167
export interface ErrorResponse {
168-
error: { message: string; type?: string; code?: string };
168+
error: { message: string; type?: string; param?: string | null; code?: string };
169169
status?: number;
170170
}
171171

0 commit comments

Comments
 (0)