Exceptions

exception pigwig.exceptions.HTTPException(code, body)[source]

Bases: Exception

raise in a route handler to generate a non-200 response

Parameters:
  • code – interpreted the same way as Response.code
  • body – unlike in Response, must be a str
exception pigwig.exceptions.RouteConflict[source]

Bases: Exception

raised when creating a PigWig app if two routes conflict