Simplify the try and catch to fix the bug due to bad JSON parsing.