Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

status code: input parsing, no EnvironmentError case handling #460

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions api_inference_community/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ async def pipeline_route(request: Request) -> Response:

try:
inputs, params = normalize_payload(payload, task, sampling_rate=sampling_rate)
except EnvironmentError as e:
# Since we catch the environment edge cases earlier above, this should not happen here anymore
# harmless to keep it, just in case
logger.error("Error while parsing input %s", e)
return JSONResponse({"error": str(e)}, status_code=500)
except ValidationError as e:
errors = []
for error in e.errors():
Expand Down
Loading