Method

EDataServerWebDAVSessionreplace_with_detailed_error

since: 3.26

Declaration [src]

gboolean
e_webdav_session_replace_with_detailed_error (
  EWebDAVSession* webdav,
  SoupMessage* message,
  const GByteArray* response_data,
  gboolean ignore_multistatus,
  const gchar* prefix,
  GError** error
)

Description [src]

Tries to read detailed error information from response_data, if not provided, then from messages response_body. If the detailed error cannot be found, then does nothing, otherwise frees the content of inout_error, if any, and then populates it with an error message prefixed with prefix.

The prefix might be of form “Failed to something”, because the resulting error message will be: “Failed to something: HTTP error code XXX (reason_phrase): detailed_error”. When prefix is NULL, the error message will be: “Failed with HTTP error code XXX (reason phrase): detailed_error”.

As the caller might not be interested in errors, also the inout_error can be NULL, in which case the function does nothing.

Available since: 3.26

Parameters

message

Type: SoupMessage

A SoupMessage.

The data is owned by the caller of the method.
response_data

Type: An array of guint8

Received response data, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
ignore_multistatus

Type: gboolean

Whether to ignore multistatus responses.

prefix

Type: const gchar*

Error message prefix, used when replacing, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

Whether any detailed error had been recognized.