valid: better error structure