app: add support for empty responses
If a dynamic request handler returns None with "wrap_result" disabled, set the return status to 204. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
b369173f94
commit
e46b4994d4
|
@ -598,6 +598,8 @@ class DynamicRequestHandler(AuthorizedRequestHandler):
|
|||
e.status_code, str(e)) from e
|
||||
if self.wrap_result:
|
||||
result = {'result': result}
|
||||
if result is None:
|
||||
self.set_status(204)
|
||||
self._log_debug(f"HTTP Response::{req}", result)
|
||||
self.finish(result)
|
||||
|
||||
|
|
Loading…
Reference in New Issue