private ValidationEvent errorNoTrait(Shape shape, ShapeId target) {
        return error(shape,
                format(
                        "`%s` cannot be bound as an error because it is not marked with the `error` trait.",
                        target));
    }
Validates that neighbors target resolvable shapes of the correct type.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/TargetValidator.java