[Issue #3] Added an error handler block to the JSON call