Skip to content

Commit 34e128f

Browse files
committed
chore: fix error handler in readme (#704)
1 parent c21ef88 commit 34e128f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ a subclass of `APIError` will be thrown:
275275
async function main() {
276276
const job = await openai.fineTuning.jobs
277277
.create({ model: 'gpt-3.5-turbo', training_file: 'file-abc123' })
278-
.catch((err) => {
278+
.catch(async (err) => {
279279
if (err instanceof OpenAI.APIError) {
280280
console.log(err.status); // 400
281281
console.log(err.name); // BadRequestError

0 commit comments

Comments
 (0)