Merge pull request #252 from kgriffs/fix-upgrade-required
fix(errors): Remove HTTPUpgradeRequired class
This commit is contained in:
@@ -258,24 +258,6 @@ class HTTPRangeNotSatisfiable(HTTPError):
|
||||
HTTPError.__init__(self, status.HTTP_416, None, None, headers=headers)
|
||||
|
||||
|
||||
class HTTPUpgradeRequired(HTTPError):
|
||||
"""426 Upgrade Required.
|
||||
|
||||
The protocol used by the client is not supported. It must retry the
|
||||
request using the protocol identified in the Upgrade header.
|
||||
|
||||
Args:
|
||||
title (str): Error title.
|
||||
description (str): Human-friendly description of the error, along with
|
||||
a helpful suggestion or two.
|
||||
kwargs (optional): Same as for ``HTTPError``.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, title, description, **kwargs):
|
||||
HTTPError.__init__(self, status.HTTP_426, title, description, **kwargs)
|
||||
|
||||
|
||||
class HTTPInternalServerError(HTTPError):
|
||||
"""500 Internal Server Error.
|
||||
|
||||
|
||||
@@ -335,6 +335,5 @@ class TestHTTPError(testing.TestBase):
|
||||
self._misc_test(falcon.HTTPPreconditionFailed, falcon.HTTP_412)
|
||||
self._misc_test(falcon.HTTPUnsupportedMediaType, falcon.HTTP_415,
|
||||
needs_title=False)
|
||||
self._misc_test(falcon.HTTPUpgradeRequired, falcon.HTTP_426)
|
||||
self._misc_test(falcon.HTTPInternalServerError, falcon.HTTP_500)
|
||||
self._misc_test(falcon.HTTPBadGateway, falcon.HTTP_502)
|
||||
|
||||
Reference in New Issue
Block a user