Error handler: set 'code' and 'description' defaults separately.
This commit is contained in:
@@ -378,6 +378,7 @@ class PillarServer(Eve):
|
|||||||
# handle it as a 500.
|
# handle it as a 500.
|
||||||
if not hasattr(error_ob, 'code'):
|
if not hasattr(error_ob, 'code'):
|
||||||
error_ob.code = 500
|
error_ob.code = 500
|
||||||
|
if not hasattr(error_ob, 'description'):
|
||||||
error_ob.description = str(error_ob)
|
error_ob.description = str(error_ob)
|
||||||
|
|
||||||
if request.full_path.startswith('/%s/' % self.config['URL_PREFIX']):
|
if request.full_path.startswith('/%s/' % self.config['URL_PREFIX']):
|
||||||
|
Reference in New Issue
Block a user