From 23468407acc9c7baaadb9501bcdacab881b60708 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 4 Mar 2024 21:53:34 +0100 Subject: [PATCH] chore: fix error handler in readme (#307) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c1f413e..98b813af 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ async function main() { messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-opus-20240229', }) - .catch((err) => { + .catch(async (err) => { if (err instanceof Anthropic.APIError) { console.log(err.status); // 400 console.log(err.name); // BadRequestError