Skip to content

Commit

Permalink
Error handling for converting from team name to id
Browse files Browse the repository at this point in the history
  • Loading branch information
larsLotNav committed Sep 13, 2023
1 parent 90a5997 commit 2d48ebf
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ public static ServiceDto toServiceDtoShallow(ServiceEntity entity){
}

private static String mapTeamNavnTeamKatalog(String teamId){
return teamIdTeamKatalog.getOrDefault(UUID.fromString(teamId),teamId);
UUID uuid;
try{
uuid = UUID.fromString(teamId);
}
catch (Exception e){
return teamId;
}
return teamIdTeamKatalog.getOrDefault(uuid,teamId);
}

public static List<OPSmessageDto> toOpsMessageDtoShallow(List<OpsMessageEntity> entities){
Expand Down

0 comments on commit 2d48ebf

Please sign in to comment.