Refactor: remove redundant full module paths in exception handlers (#23076)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Yongtao Huang
2025-07-29 09:40:51 +08:00
committed by GitHub
parent f5e1fa4bd2
commit 57e0a12ccd
4 changed files with 25 additions and 16 deletions

View File

@@ -5,7 +5,6 @@ from flask_restful import Resource, fields, marshal_with, reqparse
from flask_restful.inputs import int_range
from werkzeug.exceptions import Forbidden, InternalServerError, NotFound
import services
from controllers.console import api
from controllers.console.app.error import (
CompletionRequestError,
@@ -133,7 +132,7 @@ class MessageFeedbackApi(Resource):
rating=args.get("rating"),
content=None,
)
except services.errors.message.MessageNotExistsError:
except MessageNotExistsError:
raise NotFound("Message Not Exists.")
return {"result": "success"}