code: def contrail_error_handler(f):
      
      @wraps(f)
      def wrapper(*args, **kwargs):
          try:
              return f(*args, **kwargs)
          except HttpError as e:
              # Replace message by details to provide a
              # meaningful message
              if e.details:
                  e.message, e.details = e.details, e.message
                  e.args = ("%s (HTTP %s)" % (e.message, e.http_status),)
              raise
      return wrapper
docs: Handle HTTP errors returned by the API server