diff --git a/packages/inference/src/tasks/custom/request.ts b/packages/inference/src/tasks/custom/request.ts index 05a31a237..99a4beac2 100644 --- a/packages/inference/src/tasks/custom/request.ts +++ b/packages/inference/src/tasks/custom/request.ts @@ -32,7 +32,7 @@ export async function request( throw new Error(`Server ${args.model} does not seem to support chat completion. Error: ${output.error}`); } if (output.error) { - throw new Error(output.error); + throw new Error(JSON.stringify(output.error)); } } throw new Error("An error occurred while fetching the blob");