# notifyMultipleCandidatesFound method

1. @protected

String notifyMultipleCandidatesFound(

1. Class requiredType,
2. Map<String, Object> candidates

)

Notifies that multiple candidates were found for a required dependency.

This method creates and throws an appropriate exception when multiple pods satisfy a dependency requirement and autowiring cannot determine which one to use.

`requiredType` the type of dependency that has multiple candidates `candidates` the map of candidate pod names to instances

Throws:

- NoUniquePodDefinitionException with detailed error message

## Implementation

    @protected
    String notifyMultipleCandidatesFound(Class requiredType, Map<String, Object> candidates) {
      final typeName = requiredType.getQualifiedName().substring(requiredType.getQualifiedName().lastIndexOf(".") + 1);

      throw NoUniquePodDefinitionException.byTypeWithNamesAndMessage(
        requiredType,
        candidates.keys.toList(),
        "Multiple pod definitions found for required type '$typeName' (qualified name: '${requiredType.getQualifiedName()}'). "
        "Candidates: ${candidates.keys.join(', ')}. "
        "Consider marking one as @Primary, using @Qualifier to disambiguate, or narrowing the injection point."
      );
    }