Skip to content

Commit 62c4534

Browse files
committed
SimpleTest: Only throw AlgoliaExceptions
1 parent 322a0b0 commit 62c4534

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/algolia/search/saas/Index.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,8 @@ public JSONObject getObjects(List<String> objectIDs, List<String> attributesToRe
226226
JSONObject body = new JSONObject();
227227
body.put("requests", requests);
228228
return client.postRequest("/1/indexes/*/objects", body.toString(), false, false);
229-
} catch (JSONException e) {
229+
} catch (JSONException | UnsupportedEncodingException e) {
230230
throw new AlgoliaException(e.getMessage());
231-
} catch (UnsupportedEncodingException e) {
232-
throw new RuntimeException(e);
233231
}
234232
}
235233

0 commit comments

Comments
 (0)