UPD: [client] improved error handling