Skip to content

Conversation

@uedvt359
Copy link

@uedvt359 uedvt359 commented Dec 1, 2025

when an api request fails, currently we simply get the http status code. this is not very descriptive, and i'd like to inspect the json response for the error message. this patch allows this.

this allows for the following code:

    try:
        vaultwarden_client.api_request(...)
    except httpx.HTTPStatusError as e:
        print(e.response.json()["message"]) # e.g. "No rights to modify the collection", instead of just "400".

…ion handler

this allows for the following code:
    try:
        vaultwarden_client.api_request(...)
    except httpx.HTTPStatusError as e:
        print(e.response.json())
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.

1 participant