def http_reply(self):
data = {<EOL>'<STR_LIT:status>': self.status,<EOL>'<STR_LIT:error>': self.code.upper(),<EOL>'<STR_LIT>': str(self)<EOL>}<EOL>if self.error_caught:<EOL><INDENT>data['<STR_LIT>'] = pformat(self.error_caught)<EOL><DEDENT>if self.error_id:<EOL><INDENT>data['<STR_LIT>'] = self.error_id<EOL><DEDENT>if self.user_message:<EOL><INDENT>data['<STR_LIT>'] = self.user_message<EOL><DEDENT>r = jsonify(data)<EOL>r.status_code = self.status<EOL>if str(self.status) != "<STR_LIT>":<EOL><INDENT>log.warn("<STR_LIT>" % (self.status, self.code, str(self)))<EOL><DEDENT>return r<EOL>
Return a Flask reply object describing this error