Skip to content

Commit e91892f

Browse files
lesnik512claude
andcommitted
docs(recipes): correct DuplicateProviderTypeError message text
End-to-end verification against the published modern-di surfaced that the actual exception message reads "Provider is duplicated by type <class 'httpware.client.AsyncClient'>. To resolve this issue: ..." — not the shorter "AsyncClient is already registered" the recipe showed. Module path and class name were already correct. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0142110 commit e91892f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/recipes/modern-di.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class ServiceClients(Group):
5656
)
5757

5858
# At Container(...) construction:
59-
# modern_di.exceptions.DuplicateProviderTypeError: AsyncClient is already registered
59+
# modern_di.exceptions.DuplicateProviderTypeError: Provider is duplicated by type
60+
# <class 'httpware.client.AsyncClient'>. To resolve this issue: ...
6061
```
6162

6263
`modern-di` resolves dependencies by `bound_type`, which defaults to the creator's return type. Both providers default to `bound_type=AsyncClient` and collide in the providers registry.

0 commit comments

Comments
 (0)