diff --git a/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSSmartling.java b/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSSmartling.java index c02b6e9643..ad84835d03 100644 --- a/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSSmartling.java +++ b/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSSmartling.java @@ -127,7 +127,7 @@ public ThirdPartyTMSSmartling( MeterRegistry meterRegistry, QuartzPollableTaskScheduler quartzPollableTaskScheduler, AITranslationConfiguration aiTranslationConfiguration, - AITranslationService aiTranslationService) { + @Autowired(required = false) AITranslationService aiTranslationService) { this( smartlingClient, textUnitSearcher, @@ -754,6 +754,10 @@ public void pushAITranslations( String skipAssetsWithPathPattern, String includeTextUnitsWithPattern, List optionList) { + if (aiTranslationService == null) { + throw new UnsupportedOperationException( + "AI translation service is not supported as no AITranslationService bean is configured."); + } try (var timer = Timer.resource(meterRegistry, "SmartlingSync.pushAITranslations") .tag("repository", repository.getName())) {