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

Better error handling in post video_upload #33

Open
HanFa opened this issue Jul 19, 2024 · 0 comments
Open

Better error handling in post video_upload #33

HanFa opened this issue Jul 19, 2024 · 0 comments

Comments

@HanFa
Copy link
Contributor

HanFa commented Jul 19, 2024

[2024-07-19 04:16:40,272] ERROR in app: Exception on /video_upload [POST]
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/opt/conda/lib/python3.10/site-packages/prometheus_flask_exporter/__init__.py", line 765, in func
    return current_app.handle_user_exception(ex)
  File "/opt/conda/lib/python3.10/site-packages/prometheus_flask_exporter/__init__.py", line 763, in func
    raise exception
  File "/opt/conda/lib/python3.10/site-packages/prometheus_flask_exporter/__init__.py", line 721, in func
    response = current_app.handle_user_exception(ex)
  File "/opt/conda/lib/python3.10/site-packages/prometheus_flask_exporter/__init__.py", line 718, in func
    response = f(*args, **kwargs)
  File "/app/app.py", line 120, in video_upload
    file_ext = get_extension(filename)
  File "/app/app.py", line 95, in get_extension
    return filename.rsplit('.', 1)[1].lower()
IndexError: list index out of range
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

No branches or pull requests

1 participant