Skip to content

Commit

Permalink
chore: fix error handler in readme (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 4, 2024
1 parent d903b5a commit 5007a1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down

0 comments on commit 5007a1e

Please sign in to comment.