When we make rest call in microflow we for error handling we have the option of set error handling. After choosing that option we can show content from the latestHttpResponse in show message activity. But I would like to show different messages for different status codes because the content of latestHttpResponse variable will have always JSON format and we could not show JSON message to the user. Please suggest me the ways to implement it. Currently what I have done is I am writing conditions in the template and using that to show in the message. Is this correct way to do or is there any other ways to handle status code wise errors.
This seems like a pretty good implementation. If there is more detail in latestHttpResponse that you’d like to show to the user, you can also use import the JSON. Do this by creating an Import Mapping for the error message structure, and use the microflow activity “Apply Import Mapping” to turn the JSON string into Mendix objects.