introduced exception handling for failed JSON requests