Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit a2abdca

Browse files
Added error handling
1 parent 885a8e9 commit a2abdca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/net/cryptic_game/microservice/MicroService.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ public JSONObject handleFromUser(List<String> endpoint, JSONObject data, UUID us
225225
}
226226

227227
return result;
228-
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ignored) {
228+
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
229+
LOG.error("Error executing endpoint {}.", endpoint, e);
229230
return INTERNAL_ERROR.getResponse();
230231
}
231232
} else {
@@ -251,7 +252,8 @@ public JSONObject handleFromMicroService(List<String> endpoint, JSONObject data,
251252
}
252253

253254
return result;
254-
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ignored) {
255+
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
256+
LOG.error("Error executing endpoint {}.", endpoint, e);
255257
return INTERNAL_ERROR.getResponse();
256258
}
257259
} else {

0 commit comments

Comments
 (0)