Add client.Error to parse and catch API errors
Make client return API errors, protocol errors too