Better error handling, send error messages to server, so that it can present them to user