Handling of server response and error.
Merge remote-tracking branch 'origin'