fix(dictionary): 修复语义映射和错误日志

- 修复语义映射:强制将输入转换为查询语言的对应词
- 移除拼写自动纠正,避免错误纠正(如 franch→franchise)
- 修复 winston 日志 Error 对象序列化问题
This commit is contained in:
2026-03-09 18:14:14 +08:00
parent 6c811a77db
commit 719aef5a7f
5 changed files with 17 additions and 17 deletions

View File

@@ -42,7 +42,7 @@ export const serviceLookUp = async (dto: ServiceInputLookUp) => {
},
response.entries
).catch(error => {
log.error("Failed to save dictionary data", { error });
log.error("Failed to save dictionary data", { error: error instanceof Error ? error.message : String(error) });
});
return response;
@@ -54,7 +54,7 @@ export const serviceLookUp = async (dto: ServiceInputLookUp) => {
definitionLang: definitionLang,
dictionaryItemId: lastLookUpResult.id
}).catch(error => {
log.error("Failed to save dictionary data", { error });
log.error("Failed to save dictionary data", { error: error instanceof Error ? error.message : String(error) });
});
return {
standardForm: lastLookUpResult.standardForm,