Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81138

Native REST, how to handle json error response when using import mapping

$
0
0

Hello,

When using the native Rest functionality how should I handle/process the json response in case of an error. For example when all goes well I receivethe following JSON:

{"data":{"result":"Created","userId":"1","expireIn":1800}

But if for whatever reason the webservice cannot process my request correctly it will return another JSON string for example :

{"errors":[{"field":"Email","type":"Format","details":"Email","errorMessage":"Invalid e-mail address","message":"Invalid e-mail address"}]}

When setting the response to "Import mapping for the entire response" I cannot get this error JSON, the created objects exist but with no data (which is logical, but I cannot get the error message).

Does anyone know how to do this?

Thanks


Viewing all articles
Browse latest Browse all 81138

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>