Skip to content

Commit

Permalink
fix: fix streaming validation error message (#5981)
Browse files Browse the repository at this point in the history
  • Loading branch information
alaeddine-13 authored Jul 26, 2023
1 parent 2b043f4 commit 4ea03af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jina/serve/runtimes/worker/request_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,9 @@ async def stream_doc(
)
async for doc in result:
if not isinstance(doc, request_endpoint.response_schema):
ex = ValueError('endpoint must be generator')
ex = ValueError(
f'output document type {doc.__class__.__name__} does not match the endpoint output type {request_endpoint.response_schema.__name__}'
)
self.logger.error(
f'{ex!r}'
+ f'\n add "--quiet-error" to suppress the exception details'
Expand Down

0 comments on commit 4ea03af

Please sign in to comment.