cli: proper error reporting