Skip to content

Commit

Permalink
EA-3705 sonarq
Browse files Browse the repository at this point in the history
  • Loading branch information
SrishtiSingh-eu committed Feb 12, 2024
1 parent caea7cc commit 80c26bd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public void detectLang(List<LanguageDetectionObj> languageDetectionObjs) throws
if (e instanceof ExternalServiceException) {
throw new LanguageDetectionException(e.getMessage(), HttpStatus.BAD_GATEWAY.value(), e);
}
LOG.debug(e.getMessage());
if (LOG.isDebugEnabled()) {
LOG.debug(e.getMessage());
}
throw new LanguageDetectionException(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR.value(), e);
}
}
Expand Down Expand Up @@ -160,7 +162,9 @@ public void translate(List<TranslationObj> translationStrings) throws Translatio
if (e instanceof ExternalServiceException) {
throw new TranslationException(e.getMessage(), HttpStatus.BAD_GATEWAY.value(), e);
}
LOG.debug(e.getMessage());
if (LOG.isDebugEnabled()) {
LOG.debug(e.getMessage());
}
throw new TranslationException(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR.value(), e);
}

Expand Down

0 comments on commit 80c26bd

Please sign in to comment.