Skip to content

Commit

Permalink
chore: fix error handler in readme (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 4, 2024
1 parent e1db98b commit 4ff790a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ a subclass of `APIError` will be thrown:
async function main() {
const job = await openai.fineTuning.jobs
.create({ model: 'gpt-3.5-turbo', training_file: 'file-abc123' })
.catch((err) => {
.catch(async (err) => {
if (err instanceof OpenAI.APIError) {
console.log(err.status); // 400
console.log(err.name); // BadRequestError
Expand Down

0 comments on commit 4ff790a

Please sign in to comment.