kgv1dec: return meaningful error codes.