fix: gen_sms_code.dspy handle both None return and exception from generate_sms_code
This commit is contained in:
parent
4038b7d0b9
commit
c949a51f2e
@ -18,6 +18,13 @@ except Exception as e:
|
|||||||
"message": f"发送验证码出错: {e}"
|
"message": f"发送验证码出错: {e}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if xx is None:
|
||||||
|
return {
|
||||||
|
"status": "error",
|
||||||
|
"data": {
|
||||||
|
"message": "发送验证码出错,请检查短信模板配置和百度API连接"
|
||||||
|
}
|
||||||
|
}
|
||||||
id, code = xx
|
id, code = xx
|
||||||
debug(f'{id=},{code=}')
|
debug(f'{id=},{code=}')
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user