added try/catch to getJson