I have an API which calls Shopify to get conversion summary. It is setup correctly in the API connector and initialized as well. But when I use the same API in the backend WF i do not get any results.
If I re-run the API using the same parameter later in the API connector, I get the results. What might be causing this issue?
The easiest way to debug this is to create a log data type and store the Result of step X's raw body text. That will let you see the error message from Shopify. If you still get stuck, then replace the Shopify URL in the API Connector with a webhook catcher from a site like https://webhook.site and that will let you see / investigate the raw JSON payload.
It’s very obviously something wrong with your webhook, you have to fix the Request data part. Show a screenshot of the backend workflow parameter/request data itself. I remember for this you had to manually delete “initialize” or something after initializing it.
For every api call used as action in an app, ensure you check box for continue with errors and other box for headers. Then have data type called API Fails with fields of text for message, code, body, type, raw and maybe another for location of app.
After every api action do a create new thing, api fail with condition only when result of previous step returned an error is yes. Populate fields with previous step error message, code, body and raw text. Store anything else helpful like dates depending on what api provider gives in their dashboard to find calls.
This will save you headaches like not seeing raw text, because error message, code and body are stored…more often than not with errors the raw text is empty and it’s the error message, code or body that give details, but raw text can help so should be included. Header dates are helpful often too.
With that, it’s simply to debug api errors, and you can expand that to include a database trigger change for a new api fail record creation to email and alert admin.
This saves so much time. I was just testing a pdf creation, which at 1pm worked, at 2pm didn’t and my api fail records showed insufficient funds as reason.
@lindsay.esterman currently API Connector responses aren’t logged in server logs which makes debugging hard. Surely this could be an easy add If there’s pushback because of security concerns then 1. the API call response is already visible to the client for front-end workflows 2. the user is likely using the result in subsequent actions which are logged anyway
This would be a big QoL improvement, for what I hope is very little effort!
I don’t even bother. I just send metadata and inspect the logs of the API provider. Stripe has the most detailed inspector of any platform. OpenAI’s logs are pretty good, etc.