Skip to content

Commit

Permalink
v0.22.0, Updating http exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Dec 16, 2017
1 parent f7c4a79 commit 5b50957
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nanohttp/__init__.py
Expand Up @@ -2,7 +2,7 @@

from .exceptions import HttpStatus, HttpBadRequest, HttpUnauthorized, HttpForbidden, HttpNotFound, \
HttpMethodNotAllowed, HttpConflict, HttpGone, HttpRedirect, HttpMovedPermanently, HttpFound, \
HttpInternalServerError, HttpNotModified
HttpInternalServerError, HttpNotModified, HttpBadGatewayError, HttpPreconditionFailed
from .controllers import Controller, RestController, Static
from .decorators import action, html, json, xml, binary, text, ifmatch, etag
from .helpers import quickstart, LazyAttribute
Expand All @@ -11,4 +11,4 @@
from .configuration import settings, configure
from .application import Application

__version__ = '0.21.0'
__version__ = '0.22.0'
4 changes: 4 additions & 0 deletions nanohttp/exceptions.py
Expand Up @@ -99,3 +99,7 @@ def info(self):
if settings.debug:
return traceback.format_exc()
return 'Server got itself in trouble'


class HttpBadGatewayError(HttpStatus):
status_code, status_text = 502, 'Bad Gateway'

0 comments on commit 5b50957

Please sign in to comment.