Skip to content

Exception status_code attribute missing #152

Description

@kth8

Hi, I was looking at the docs for handling exceptions in Python

https://github.com/deedy5/primp/blob/main/crates/primp-python/docs/exceptions.md

which states:

├── StatusError           # HTTP 4xx/5xx (has status_code attribute)

and

except primp.StatusError as e:
    print(f"HTTP {e.status_code} error")

but when I actually tried to use it, I got:

    print(f"HTTP {e.status_code} error")
                  ^^^^^^^^^^^^^
AttributeError: 'StatusError' object has no attribute 'status_code'

I asked my agent to investigate the issue and it came up with this

Image

Hopefully you understand what this means more than I do and if this assessment is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions