You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
Error logged from NodeJS Agones SDK:
Error: 14 UNAVAILABLE: Connection dropped
from watchGameServer. This happened after calling shutdown intentionally.
What you expected to happen:
I should be able to catch this error, and I cannot because it is wrapped in a callback. The error callback is executed asynchronously, so It throws into a separate execution context and crashes the node process as an unhandled exception.
Instead, watchGameServer should take an onError callback or something, so that I can handle this sort of error.
How to reproduce it (as minimally and precisely as possible):
Just call watchGameServer, then call shutdown.
Anything else we need to know?:
Environment:
Agones version: 1.17.0
Kubernetes version (use kubectl version): v1.22.2
Cloud provider or hardware configuration: GKE
Install method (yaml/helm): helm
Troubleshooting guide log(s):
Others:
The text was updated successfully, but these errors were encountered:
I think the idea of a 2nd optional callback to watchGameServer is perfect and we just call that with the error if it is present, or do nothing if it is not, removing the throw as it has no benefit. We can also remove the capture of the specific grpc.status.CANCELLED error and let the client code decide what to do with any errors.
I can make the PR within the next couple of days unless anyone else wants to? I would include:
What happened:
Error logged from NodeJS Agones SDK:
Error: 14 UNAVAILABLE: Connection dropped
from watchGameServer. This happened after calling shutdown intentionally.
What you expected to happen:
I should be able to catch this error, and I cannot because it is wrapped in a callback. The error callback is executed asynchronously, so It throws into a separate execution context and crashes the node process as an unhandled exception.
Instead, watchGameServer should take an onError callback or something, so that I can handle this sort of error.
How to reproduce it (as minimally and precisely as possible):
Just call watchGameServer, then call shutdown.
Anything else we need to know?:
Environment:
kubectl version
): v1.22.2The text was updated successfully, but these errors were encountered: