I am making a post request to an external API - in case, I get an error I want to return the error along with the error.response.data that axios typically has to the caller. How do I do this in the HTTP post request as I could not see any reference to the error there?
Update after a few hours of research and trials : I figured out that the platform-version of axios returns response.data directly if the call is successful and returns the error and the full axios object. I now need to reference this in the next step. But the execution is ending here. Am I supposed to execute try-catch in this step to test whether there are errors? Since I don’t have access to code here, just params, I can’t see anything related to error-handling except sending it to global error workflow.