Skip to content

Commit

Permalink
chore: fix error handler in readme (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 4, 2024
1 parent 9b0d264 commit 9945dc2
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 @@ -129,7 +129,7 @@ a subclass of `APIError` will be thrown:
async function main() {
const externalAccount = await modernTreasury.externalAccounts
.create({ counterparty_id: 'missing' })
.catch((err) => {
.catch(async (err) => {
if (err instanceof ModernTreasury.APIError) {
console.log(err.status); // 400
console.log(err.name); // BadRequestError
Expand Down

0 comments on commit 9945dc2

Please sign in to comment.