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

postConstruct inconsistency for sync and async #1545

Open
ehsan2003 opened this issue Oct 25, 2023 · 0 comments
Open

postConstruct inconsistency for sync and async #1545

ehsan2003 opened this issue Oct 25, 2023 · 0 comments

Comments

@ehsan2003
Copy link

Expected Behavior

post construct should act consistently for both async and sync post constructor functions

Current Behavior

it reshapes the errors of the synchronous post constructor while leaving the errors of async ones as is

Possible Solution

change the code that runs the post constructor and add an await like

Steps to Reproduce (for bugs)

  1. create two separated classes one with synchronous and one with asynchronous postConstructor
  2. throw error from both of them
  3. see how they are different

Context

Well to be honest my problem is way worth
I have a very very strange usecase and in my specific situation there are unhandled rejections after an error comes out of the method with postConstruct decorator
but I can't really reproduce it to show how it is and I think fixing this issue will fix that too

Your Environment

  • Version used:6.0.2
  • Environment name and version (e.g. Chrome 39, node.js 5.4): node 18.17.1
  • Operating System and version (desktop or mobile): linux ( nixos

Stack trace

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