Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strict Mode / Better Errors when dependency is missing #796

Open
genixpro opened this issue Apr 26, 2024 · 0 comments
Open

Strict Mode / Better Errors when dependency is missing #796

genixpro opened this issue Apr 26, 2024 · 0 comments

Comments

@genixpro
Copy link

I've been using this library for a while, and its great. I am often using strings to reference my dependencies, e.g. Provide['stuff']. And I have different application containers that support different configurations of applications.

Right now, if I forget a key dependency for a specific container, I end up getting an error that looks like this:

AttributeError: 'Provide' object has no attribute 'get_by_user_id'

This is because DI could not find the dependency. I would rather that the DI framework itself just threw a more descriptive error, e.g. "XYZ Dependency Not Found"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant