Skip to content

Commit f19cc09

Browse files
committed
fix: adapt error message extractor to the new format
1 parent 615c348 commit f19cc09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/inference/src/utils/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export async function innerRequest<T>(
4343
`Server ${args.model} does not seem to support chat completion. Error: ${JSON.stringify(output.error)}`
4444
);
4545
}
46-
if (output.error || output.detail) {
47-
throw new Error(JSON.stringify(output.error ?? output.detail));
46+
if (output.error || output.detail || output.message) {
47+
throw new Error(JSON.stringify(output.error ?? output.detail ?? output.message));
4848
} else {
4949
throw new Error(output);
5050
}

0 commit comments

Comments
 (0)