else if (strcmp(error, "net.connman.Error.OperationAborted")) {
    err = ECONNABORTED;
}

ECONNABORTED seems right.