修改授权接口,返回对应错误

This commit is contained in:
18610128193
2026-06-25 15:41:11 +08:00
parent 6da4fe78f3
commit a0a60bd121
+5 -2
View File
@@ -86,7 +86,7 @@ async def juliang_callback(
await get_token(auth_code, user_id, app_id, db)
return {
"message": "授权成功,这里需要跳转页面路径到 /user-oauth/oauth_list",
"message": "授权成功",
"code": 0,
}
@@ -96,7 +96,10 @@ async def juliang_callback(
detail=str(e),
)
except HTTPException:
raise
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail=f"授权失败: {str(e)}",
)
except Exception as e:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,