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

fix(modules): Fix miss leading provider resolution error #10900

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Jan 9, 2025

FIXES SUP-560

What
Currently, no matter the error when looking for a provider to exists in the container we are throwing a normalized error stating that the provider does not exists in the container. The issue is that the first initialization of the provider occurs the first time we resolve it, and the error can be that the provider failed to be instanciated for any reason.

In this pr, we are explicitly checking for the error to be an awilix resolution error to throw the classic error and otherwise we provide the issue why the provider failed to be resolved.

Copy link

changeset-bot bot commented Jan 9, 2025

⚠️ No Changeset found

Latest commit: 618c8df

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 3:29pm
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Jan 9, 2025 3:29pm
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2025 3:29pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2025 3:29pm
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2025 3:29pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2025 3:29pm
resources-docs ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2025 3:29pm

Copy link
Member

@sradevski sradevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a NIT

@kodiakhq kodiakhq bot merged commit c490e08 into develop Jan 10, 2025
23 checks passed
@kodiakhq kodiakhq bot deleted the fix/module-provider-resolution-handling branch January 10, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants