Add handling of server failure
Add handling of server response