added try catch to json parsing on server