Only try to parse JSON if no error and response.
Code style fixes for good measure.
bump version