Hi everyone,
I hope you can help me, I have a question about error management.
I’m working with zeebe with the C# client, and two workers than call a RESTful API. My model is this one :
I have some trouble, because when my API return an HTTP error (for good reason), I want to give the HTTP error code (HTTP 404 for example) to the caller. But I don’t understand how I can send some information about my error when I throw it.
So, here, I create my workflow instance, and wait for my results :
var output = await Client.NewCreateProcessInstanceCommand()
.BpmnProcessId(ProcessJobTypeBpmId)
.LatestVersion()
.Variables($"{{\"input\":{JsonConvert.SerializeObject(input, TransactionConstants.Settings)}}}")
.WithResult()
.FetchVariables()
.Send(token);
My worker A will send an error like this :
await client.NewThrowErrorCommand(job.Key).ErrorCode("1").ErrorMessage(e.Message).Send();
After this call, my workflow stop this execution, and return to the caller. But I have nothing in my output variable (not even the error message).
I wonder, how I can have some information about my throw ? Currently, I just know I have some error due to the missing output variable I need.
If you can help me, I will be very happy ! Thanks !