Exceptions

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

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]

raised when creating a PigWig app if two routes conflict