pass error from sync task to client

Added passing of error from sync task to client. @jh-bate ready for review, with https://github.com/tidepool-org/in-d-gestion/pull/36
no records isn't a 500  - there is just no data