I'm converting my REST API integration code to the new FM16 format (love it) and want some advice on error trapping.
I'm just learning about the cURL options and need to make sure to catch all errors.
Does anyone have "standard" error trapping advice for this?
Currently I'm checking for:
-Get(LastError) <> 0 and displaying Get(LastExternalErrorDetail) if that happens.
-Left($result,1)=? (Invalid JSON data error)
Do I need to get the --dump-header and parse the HTTP Response Status out or will that be caught by the Get(LastError) if its not in the 200 range.
What does the --show-error do?
You need to check CURL result for error status of transfer, than HTTP status for error from web server and than whatever the service uses to return errors.