### What problem does this PR solve?

1. Refactor error message
2. Fix knowledges are created on ES and can't be found in Infinity. The
document chunk fetch error.

### Type of change

- [x] Fix bug
- [x] Refactoring

---------

Signed-off-by: jinhai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2024-12-26 16:08:17 +08:00
committed by GitHub
parent 9fa73771ee
commit 722545e5e0
6 changed files with 31 additions and 23 deletions

View File

@ -94,7 +94,7 @@ def getsse(canvas_id):
token = token[1]
objs = APIToken.query(beta=token)
if not objs:
return get_data_error_result(message='Token is not valid!"')
return get_data_error_result(message='Authentication error: API key is invalid!"')
e, c = UserCanvasService.get_by_id(canvas_id)
if not e:
return get_data_error_result(message="canvas not found.")