Question

How to handle app return error from API side in Zapier?

  • 9 August 2022
  • 1 reply
  • 514 views

How can i handle api return error in user friendly mode, currently i am getting api’s return error like this screenshot which is mentioned below
But want to return some user friendly formatted data with response code.
 

here i receive validation error “one of the url is invalid”

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 4
Badge +9

Hi there!

To handle which messages are surfaced to the user, you have access to z.errors collection.

You can use Code Mode in the Visual Builder app, or convert your app to CLI for a better experience when using code. 

Code Mode: https://platform.zapier.com/docs/faq#how-does-code-mode-work

Export to CLI: https://platform.zapier.com/docs/export

Error Handling Toolset: https://github.com/zapier/zapier-platform/blob/master/packages/cli/README.md#error-handling