diff --git a/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaVCIssuancePluginImpl.java b/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaVCIssuancePluginImpl.java index 5883893a871..90f4fbe82e4 100644 --- a/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaVCIssuancePluginImpl.java +++ b/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaVCIssuancePluginImpl.java @@ -201,7 +201,13 @@ private List convertLangCodesToISO3LanguageCodes(String[] langCodes) { if(langCodes == null || langCodes.length == 0) return List.of("eng"); return Arrays.stream(langCodes) - .map(langCode -> new Locale(langCode).getISO3Language()) + .map(langCode -> { + try { + return new Locale(langCode).getISO3Language(); + } catch (MissingResourceException ex) {} + return null; + }) + .filter(Objects::nonNull) .collect(Collectors.toList()); } }