camunda-community-hub / zeebe-client-node-js

Node.js client library for Zeebe Microservices Orchestration Engine
https://camunda-community-hub.github.io/zeebe-client-node-js/
Apache License 2.0
152 stars 38 forks source link

resolveIncident is not working #242

Closed mrsateeshp closed 2 years ago

mrsateeshp commented 3 years ago

zbc.resolveIndecent(incidentKey) is not working, invoking the method reports following error(thrown by gateway):

11:58:32.978 | zeebe | ERROR: [resolveIncident]: 14 UNAVAILABLE: Expected to execute command on partition 0, but either it does not exist, or the gateway is not yet aware of it

having looked at the code, the following snippet appeared to be the culprit, grpc api is expecting json but the below code is passing string.

public resolveIncident(incidentKey: string): Promise<void> {
    return this.executeOperation('resolveIncident', () =>
       this.grpc.resolveIncidentSync(incidentKey)  //FIXME: this should be {incidentKey: incidentKey}
    )
}
jwulf commented 2 years ago

Version 1.3.5 has been published with this patch in it.

Thank you for your contribution!