def handle_request(self, data): try: return self.handle_request_and_fail(data) except LiveStatusQueryError, exp: # LiveStatusQueryError(404, table) # LiveStatusQueryError(450, column) code, detail = exp.args response = LiveStatusResponse() response.output = LiveStatusQueryError.messages[code] % detail response.statuscode = code if 'fixed16' in data: response.responseheader = 'fixed16' return response.respond()