Return NULL on sync connection errors

As discussed on chat