Fix error cases caused by `errorCb` not existing.

Create a dummy function for the several cases in `sendMessage` in which `errorCb` is assumed to exist.