client: fix error reporting