Skip to content

Jellyfin API requests errors not displayed and not logged #404

@tomrss

Description

@tomrss

Hello, thanks for this project.

This is not a report for a real bug, more of a behavior that makes troubleshooting very uncomfortable.

Errors in API requests are not displayed in the GUI and not logged:

r = requests.get(url, headers=self.headers, verify=self.verify_cert)
try:
try:
'''
The requests library defaults to using simplejson to handle
json decoding. On low power devices and using Py3, this is
significantly slower than the builtin json library. Skip that
and just parse the json ourselves. Fall back to using
requests/simplejson if there's a parsing error.
'''
r.raise_for_status()
response_data = json.loads(r.text)
except ValueError:
response_data = r.json()
except: # noqa
response_data = {}

(example for GET, but this is true also for POST and DELETE).

I think some reporting about the error (like a popup in the GUI or even a simple log) would be extremely useful.

If you also think this is useful, I will be happy to provide a PR for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions