Skip to content

Commit

Permalink
Handle zapier errors (#627)
Browse files Browse the repository at this point in the history
Co-authored-by: Ankush Gola <9536492+agola11@users.noreply.github.com>
  • Loading branch information
nfcampos and agola11 committed Apr 5, 2023
1 parent 7d7e79c commit 22e2b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langchain/src/agents/tools/zapier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class ZapierNLAWrapper {
params?: ZapierValues
): Promise<ZapierValues> {
const resp = await this._getActionRequest(actionId, instructions, params);
return resp.result;
return resp.status === "error" ? resp.error : resp.result;
}

/**
Expand Down

1 comment on commit 22e2b73

@vercel
Copy link

@vercel vercel bot commented on 22e2b73 Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.