Hey there,
I am new to MAKE and am building an integration with my API. I am setting up my custom app, and it works fine; however, I’ve been struggling to fix an issue with error handling.
My API responses follow this pattern:
{
"success": boolean,
"error": text or null,
"details": text or array, // only available if "error" has some data
"data": json,
}
Module communication code:
As you can see I’ve added the “error” code everywhere to make sure that the error would appear, but still doesn’t appear anywhere.
{
"url": "https://api.firecrawl.dev/v1/scrape",
"body": "{{parameters}}",
"method": "POST",
"response": {
"output": {
"body": "{{body}}",
"headers": "{{headers}}",
"statusCode": "{{statusCode}}",
"result":"{{body}}",
"error": {
"type": "RuntimeError",
"message": "[{{statusCode}}] {{body.error.message}}",
"400": {
"type": "DataError",
"message": "[{{statusCode}}] {{body.error.message}}"
},
"500": {
"type": "ConnectionError",
"message": "[{{statusCode}}] {{body.error.message}}"
}
}
},
"error": {
"type": "RuntimeError",
"message": "[{{statusCode}}] {{body.error.message}}",
"400": {
"type": "DataError",
"message": "[{{statusCode}}] {{body.error.message}}"
},
"500": {
"type": "ConnectionError",
"message": "[{{statusCode}}] {{body.error.message}}"
}
}
}
}
When testing, everything works fine when the API doesn’t return errors. However, when an error occurs, it only shows this:
Additionally, you can check the MAKE Dev Tools body response, which contains exactly what should be displayed to the user.
All help is welcome, thanks