add debug logging for translation endpoint

This commit is contained in:
Hazelnoot 2025-05-12 21:33:48 -04:00
parent 7cf766d44c
commit 4e8993bad7

View file

@ -116,6 +116,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
let response = await this.cacheService.getCachedTranslation(note, targetLang);
if (!response) {
this.loggerService.logger.debug(`Fetching new translation for note=${note.id} lang=${targetLang}`);
response = await this.fetchTranslation(note, targetLang);
if (!response) {
throw new ApiError(meta.errors.translationFailed);