code: def fail(self, message, status=500, **kw):
          
          self.request.response.setStatus(status)
          result = {"success": False, "errors": message, "status": status}
          result.update(kw)
          return result
docs: Set a JSON error object and a status to the response