def error(f): message, code = humanize_failure(f) req = IRequest(ctx) req.setResponseCode(code) return json.dumps({ "error": message, })
def _bad(f): text, code = humanize_failure(f) self.dirnode_children = None self.dirnode_children_error = text return ctx