Best practice for grace failures

Dear Pabbly Support,

I have a Pabbly workflow where I am parsing a complex email to extract data and send it to an API.

The API determines if the email can be parsed or not and returns a 400 for malformed data if it's not.

Pabbly fails ungracefully on that and sends an email notifying an error when it's actually the expected behaviour.

Is there any way around that or do I need to change the HTTP response code of the CRM (I built the API).

Thanks,
Mattia
 
P

Pabblymember11

Guest
Hey @ZeldOcarina

Kindly share the name of the workflow in which you are using the API by Pabbly action step along with the API documentation of the application which you are trying to implement.
 
The workflow name is "Aletti Emails", the documentation is not available as it's a private API.
Basically it tries to create a new lead if all required data are present or it rejects the lead if any are missing with a 400 API response.
 
P

Pabblymember11

Guest
Hey @ZeldOcarina

If the API sends the status code above 400 the system will consider it an error/failed task, you need to change the API's status code from the application level to less than 400 with any code to justify the HTTP code as success.
 
P

Pabblymember11

Guest
Hey @ZeldOcarina

Correction: If the API sends the status code above 400 the system will consider it an error/failed task, you need to change the API's status code from the application level to less than 400 with any code to justify the HTTP code as success.

You mean above 400 will error out, right?
I guess I'll switch to a 204 then!
Yes, you need to change the status code from the API.
 
Top