def internal_server_error(writer, e): sys.print_exception(e) error_message = "Internal Server Error: {}".format(e) return (yield from Server.error(writer, 500, error_message, e))