-
Notifications
You must be signed in to change notification settings - Fork 535
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
More informative error messages for when we can't instantiate components #1246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this would help for running into undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧸
return this.componentRuntimeDeferred.promise; | ||
} | ||
factory = entry.IComponentFactory; | ||
registry = entry.IComponentRegistry; | ||
} | ||
|
||
if (factory === undefined) { | ||
throw new Error(`Can't find factory for ${lastPkg} package`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should follow the above pattern here:
this.componentRuntimeDeferred.reject(`Registry does not contain an entry for the package ${pkg}`);
return this.componentRuntimeDeferred.promise;
otherwise there will be a dangling deferred promise
…into BetterErrorMsgsRegistry
…into BetterErrorMsgsRegistry # Conflicts: # packages/runtime/container-runtime/src/componentContext.ts
…into BetterErrorMsgsRegistry
No description provided.