The following code in HttpClient:
JsonNode errorJson = new ObjectMapper().readTree(httpConnection.getErrorStream());
if (errorJson != null) {
errorText = errorJson.get("error").asText();
}
fails with NullPointerException on .asText() call because the API doesn't provide such field. It only has:
{"type":"api_parsing_error","message":"...","pos":{"line":1,"column":53,"id":0,"location":"query"}}