Status code 501 for Unsupported/Not implemented
The NotSupportedError should use HTTP return code 501, not 500. Change-Id: I40261a1636f0477d778a96f3d9625a5ce3b3252c
This commit is contained in:
parent
77ea046fdf
commit
aece5508c6
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The HTTP status code for NotSupportedError has been fixed. The generic
|
||||
``500 Internal Server Error`` status code was previously used, it will now
|
||||
use the ``501 Not Implemented`` status code.
|
||||
|
@ -29,8 +29,8 @@ class AliasAccessError(FishyError):
|
||||
class NotSupportedError(FishyError):
|
||||
"""Feature not supported by resource driver"""
|
||||
|
||||
def __init__(self, msg='Unsupported'):
|
||||
super().__init__(msg)
|
||||
def __init__(self, msg='Unsupported', code=501):
|
||||
super().__init__(msg, code)
|
||||
|
||||
|
||||
class NotFound(FishyError):
|
||||
|
Loading…
x
Reference in New Issue
Block a user