extracting Error Annotation to a trait