For a bad or invalid ep_id, the server can return various errors which are a combination of the HTTP status code and a message: str if that status code allows it.
Is there a way I could add a HTTP status code to my Error class? How would that look like?
class APIError(BaseModel):
message: str
class FooClient(uplink.Consumer):
@uplink.returns.json
@uplink.get("ep/{ep_id}")
def get_ep_by_id(self, ep_id: uplink.Path) -> EP | APIError:
pass