javascript icon indicating copy to clipboard operation
javascript copied to clipboard

cpToPod passes an async function into exec's statusCallback, but the promise is never awaited

Open Moggers opened this issue 1 year ago • 1 comments

cpToPod passes an async function as the statusCallback; but exec does not await the function Once upon a time it was declared as an asynchronous function but even in that case, the function wasn't awaited. This appears to result in the throw within cptopod (in cases where stderr is populated or the websocket connection fails) coercing into a promise which never gets handled; resulting ultimately in an uncaught promise rejection.

Moggers avatar Jul 02 '24 01:07 Moggers

We'd be happy to take a PR with a test demonstrating the problem, along with the fix.

As it stands right now, I'm not sure this is that easy to reproduce without a unit test (and I'm not certain that this is actually what is causing your problem)

brendandburns avatar Jul 02 '24 16:07 brendandburns

Should this issue be closed since https://github.com/kubernetes-client/javascript/pull/1880 was merged?

cjihrig avatar Sep 27 '24 15:09 cjihrig

Actually yes, thank you. The keyword in the pull request was wrong so it did not automatically close.

mstruebing avatar Sep 28 '24 16:09 mstruebing