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

Fix serve.py adding a try around the form parsing #1111

Merged
merged 2 commits into from
Mar 7, 2021
Merged

Conversation

w4nderlust
Copy link
Collaborator

No description provided.

ludwig/serve.py Outdated
form = await request.form()
files, entry = convert_input(form)
except Exception as e:
logger.error("Failed to parse batch_predict form: {}".format(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str(e) drops the stack trace. An easy way to log the exception would be with logger.exception:

logger.exception("Failed to parse batch_predict form")

Though since the current style also uses logger.error, no worries if you would rather stick to the file convention.

@w4nderlust w4nderlust merged commit 9facc60 into master Mar 7, 2021
@w4nderlust w4nderlust deleted the fix_serve_form branch March 7, 2021 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants