Skip to content

Commit

Permalink
added logger for location api (#33)
Browse files Browse the repository at this point in the history
Signed-off-by: Monobikash Das <[email protected]>
  • Loading branch information
MonobikashDas authored Feb 2, 2024
1 parent d355012 commit bea58af
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,10 @@ public String getAddressLocationFromAddress(Map<String, Object> address, String

public String fetchAddressValueFromId(String id){
try{
String url = locationsUrl + "/" + id;
LOGGER.info("Calling location url endpoint - " + url);
JSONObject json = new JSONObject(
new RestTemplate().getForObject(locationsUrl + "/" + id, String.class));
new RestTemplate().getForObject(url, String.class));
return json.getString("name");
} catch(Exception e){
throw ErrorCode.ADDRESS_FETCHING_EXCEPTION.throwUnchecked(e);
Expand Down

0 comments on commit bea58af

Please sign in to comment.