Check result.error against declared code