修改授权接口,返回对应错误
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user