fix: gen_sms_code.dspy handle both None return and exception from generate_sms_code

This commit is contained in:
yumoqing 2026-05-31 12:26:55 +08:00
parent 4038b7d0b9
commit c949a51f2e

View File

@ -18,6 +18,13 @@ except Exception as e:
"message": f"发送验证码出错: {e}"
}
}
if xx is None:
return {
"status": "error",
"data": {
"message": "发送验证码出错请检查短信模板配置和百度API连接"
}
}
id, code = xx
debug(f'{id=},{code=}')
return {