Propper error handling of server errors, fixes #13