1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-23 22:52:25 +01:00
pywb/pywb/utils/wbexception.py
Ilya Kreymer a6dc57cf4a post query: ensure post query optional buffer is a byte not string buffer
exceptions: move LiveRequestException to wbexceptions
cdx query: support for 'alt_url' which, if set, is used to create start_key and end_key
2016-03-03 13:13:44 -08:00

39 lines
976 B
Python

#=================================================================
class WbException(Exception):
def __init__(self, msg=None, url=None):
Exception.__init__(self, msg)
self.msg = msg
self.url = url
# Default Error Code
# def status(self):
# return '500 Internal Server Error'
#=================================================================
class AccessException(WbException):
def status(self):
return '403 Access Denied'
#=================================================================
class BadRequestException(WbException):
def status(self):
return '400 Bad Request'
#=================================================================
class NotFoundException(WbException):
def status(self):
return '404 Not Found'
#=================================================================
class LiveResourceException(WbException):
def status(self):
return '400 Bad Live Resource'