[BugFix]: properly catch templating error when preprocess input (#13976)

Signed-off-by: Guillaume Calmettes <gcalmettes@scaleway.com>
This commit is contained in:
Guillaume Calmettes
2025-03-14 05:58:34 -07:00
committed by GitHub
parent ab93f1360f
commit fd8e055ffb
5 changed files with 37 additions and 0 deletions
@@ -142,6 +142,9 @@ class OpenAIServingEmbedding(OpenAIServing):
except ValueError as e:
logger.exception("Error in preprocessing prompt inputs")
return self.create_error_response(str(e))
except TypeError as e:
logger.exception("Error in preprocessing prompt inputs")
return self.create_error_response(str(e))
# Schedule the request and get the result generator.
generators: list[AsyncGenerator[PoolingRequestOutput, None]] = []