Skip to content

Commit

Permalink
fix: fireworks errors are absorbed
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunattam committed Apr 30, 2024
1 parent c7e5a4a commit f478c5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ai/src/providers/fireworks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ const createChatCompletion: ICreateChatCompletion = async (body) => {
executionDone();
return { ...completion, latency };
} catch (err) {
throw new AIError(AIErrorEnum.FAILED_CHAT_COMPLETION, "Unknown error");
if (err instanceof AIError) {
throw err;
} else {
throw new AIError(AIErrorEnum.FAILED_CHAT_COMPLETION, "Unknown error");
}
}
};

Expand Down

0 comments on commit f478c5e

Please sign in to comment.