mirror of
https://github.com/fuckpiracyshield/api.git
synced 2024-12-22 10:40:48 +01:00
18 lines
455 B
Python
18 lines
455 B
Python
import sys
|
|
import os
|
|
|
|
current = os.path.dirname(os.path.realpath(__file__))
|
|
parent = os.path.dirname(current)
|
|
sys.path.append(parent)
|
|
|
|
from ioutils.request import RequestHandler
|
|
from ioutils.errors import ErrorCode, ErrorMessage
|
|
|
|
class NotFoundHandler(RequestHandler):
|
|
|
|
"""
|
|
Handle for 404 routes.
|
|
"""
|
|
|
|
def prepare(self):
|
|
self.error(status_code = 404, error_code = ErrorCode.ROUTE_NOT_FOUND, message = ErrorMessage.ROUTE_NOT_FOUND)
|