DmitryBurnaev / podcast-service

Podcast's API service
MIT License
3 stars 2 forks source link

Suggestion: use httpx status code methods and descriptions #200

Closed dolamroth closed 1 year ago

dolamroth commented 1 year ago

Instead of https://github.com/DmitryBurnaev/podcast-service/blob/12caa21a69c55fdc523dd23ef2a7c9a8d8937b6f/src/common/utils.py#L33

Use httpx.codes.is_error(...)

Instead of https://github.com/DmitryBurnaev/podcast-service/blob/efd4578f17fb9623c7267d1d8c9bac01686d8d12/src/common/statuses.py

Use httpx.codes.%something%.name/value

DmitryBurnaev commented 1 year ago

Thanks! I've created PR https://github.com/DmitryBurnaev/podcast-service/pull/203 But I can't use text description from httpx (instead of my Enum), because there are some errors which don't have appropriate name in httpx's statuses