Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

579
Views
Integromat - How to parse error message from custom API service

I set up a custom app on Integromat that integrates a custom API for a delivery service.

Some of the module, sometime, got an error due to wrong address (es. wrong zip code). The API response's body has the specific problem in the body, but during the scenario, if the error happens, I only got the Integromat error which has no extra data at all, so I have to rerun manually the scenario using Integromat dev tools to read what was the problem.

Reading here Error handling with different error structures in my custom Integromat app, I figure out to use a custom function to parse the response body

function parseErrorMessage(body) {
    if ('string' === typeof body.data)
    return JSON.parse(body.data)
}

but I didn't understand how to catch the 3 fields that hold the data: errorFieldCode, errorTypeCode and errorMessage.

The function is called in the module with this snippet:

  "response": {
    "output": "{{body}}",
    "error": "{{parseErrorMessage(body)}}"
  }

I would like to use those data in a module in the error handling path.

How should I edit the function above to parse the body into the 3 field it contains?

Here is a screenshot where you can see the module having an error, the response body with the info I need to understand the error immediately (violet border), and the output of the module instead (orange border).

I am not able to manipulate the response body, since for Integromat is and error and it populates the output field with its data.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!