throw exception if server sent errors