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

unhandled rejection #194

Open
gabrielschulhof opened this issue Feb 20, 2024 · 3 comments
Open

unhandled rejection #194

gabrielschulhof opened this issue Feb 20, 2024 · 3 comments

Comments

@gabrielschulhof
Copy link

At https://github.com/reportportal/client-javascript/blob/develop/lib/report-portal-client.js#L107, when called from https://github.com/reportportal/client-javascript/blob/develop/lib/report-portal-client.js#L518, a promise is created, which can be rejected either from https://github.com/reportportal/client-javascript/blob/develop/lib/report-portal-client.js#L538 or from https://github.com/reportportal/client-javascript/blob/develop/lib/report-portal-client.js#L543. When that happens, an unhandled promise rejection is raised, which terminates the process (in my case, nightwatch).

@AmsterGet
Copy link
Member

Hi @gabrielschulhof !
Are you using your own integration or agent-js-nightwatch?
As far as I understand you correctly, you are expecting to not trigger a rejection in case of an test item start failure.
This project is an SDK for developing custom integrations with test frameworks, so I assume that failure should occur and should be caught if necessary in the consumer code, as we need to provide some indication that a particular request has failed.

@gabrielschulhof
Copy link
Author

gabrielschulhof commented Feb 21, 2024

@AmsterGet you're right. We're not using client-javascript directly, but via agent-js-nightwatch. I'll make sure that all the promises created by client-javascript are accessible in agent-js-nightwatch, and, if so, there should be a bug in agent-js-nightwatch whererby it fails to attach a .catch() handler to one of the promises.

@AmsterGet
Copy link
Member

Hi @gabrielschulhof !
Thanks for the clarification.
Since agent-js-nightwatch is not actively maintained by us compared to other agents, fixing the issue by the core team may take time.
In the meantime, we welcome contributions and open to collaborate with potential maintainers from community :)

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

2 participants