xtr_http_foundation.exception ¶
Every error this library raises.
All of them derive from :class:HttpFoundationError, so one except catches anything
this library refuses, and a narrower one handles a single cause.
HttpFoundationError ¶
Bases: Exception
Something asked of this library that it cannot do — catch this to catch them all.
InvalidArgumentError ¶
Bases: HttpFoundationError, ValueError
A value handed to this library cannot be used: text that is not an address.
Also a :class:ValueError, so code that already guards against a bad value
catches it without knowing this library exists. It says a caller passed
something it cannot have meant, which is why the checks that decide about a
request — whether an address falls in a network — answer False instead of
raising: an address that does not parse is simply not in the network.
SessionError ¶
Bases: HttpFoundationError
The storage a session persists through could not do what was asked of it.
Raised where the failure must be heard — a load that cannot happen, a write the backend would not keep, an entry that could not be removed — and never where a stranger's input merely reads as nothing: an ID cookie nobody can read is treated as no cookie, not as an error.