ISTM (by looking at src/http_transport.c) that errors from the communication on either level (http; socket) will not get propagated to the state (struct state in the given file); and as the functions that are doing the (http transport) work do not return a status indicator whether or not operations worked (returning void instead of int, ssize_t or the like) the caller won't know.

For error handling, there is access to the error code / message on the socket layer, but aside from "not having a socket open" no error state gets propagated to the http/transport code layer AFAICS.

client_sync() still returns the amount of errors that have accumulated during attempting the sync (with not having a socket connection being one of the potential errors), but the return value from it is being ignored in callers So the path to fixing this problem would be to start paying attention what client_sync() actually is returning...