Handling "failed inside handle_json_callback"

Hi,

I am getting "failed inside handle_json_callback", and can't seem to trap or handle the error. The API call also doesn't seem to have a limiting parameter, so when one of the calls returns a large amount (which it is sort of at 9,786 bytes) of data it's stopping with "Out Of Memory Error".

I've found this thread on the same subject/error, but not a resolution. https://forums.garmin.com/showthread.php?341207-weather-sample-app/page2&highlight=handle_json_callback

Am I stuck, that I can't handle this error, and have no control/limiting on the call data, I know the app could fail.

Any ideas?

Cheers
Chris
  • If the service API you are calling doesn't allow the result set to be limited or iterated, then the only solution that comes to mind is to write a web service of your own (you can host it in google app engine or amazon web services for free assuming you stay below the free limits) that will pull down the necessary data and filter it down or cache it and allow iteration.

    Travis
  • Thanks Travis, a nice workaround.

    Garmin Team - As this has been raised by a few, can we get a fix organised? It seems difficult to handle these errors without the ability to predict or catch them. Also the API has a response code of NETWORK_RESPONSE_TOO_LARGE, which seems ideal to handle this situation?

    Thanks
    Chris
  • We've done some work with the Communication module to better manage memory use, which may tangentially help with your situation, but I agree that we need to do better at handling responses that are too large. I've filed a ticket to have this looked at more closely.
  • Just wanted to update here to let everyone know that we've made some additional fixes to better handle large JSON responses. These will be available soon.