Description
Describe the bug
Due to the composed nature of the Update-with-Start API, the server reports errors from that API in an aggregated form, containing only a generic error message, MultiOperation could not be executed
. The list of actual errors are attached as details to the aggregated error, using the MultiOperationExecutionFailure
protobuf message type, which itself needs to be decoded to obtain actual underlying errors.
The Workflow Client already does some work to decode and extract a proper error message out of MultiOperationExecutionFailure
. It then replace the grpc error's generic message by that more specific error message. We have tests that confirm that this behavior works properly.
However, it appears that printing out the grpc error prints the original, generic message rather than the proper, detailed one.
For instance, printing out error
gives:
Error: 8 RESOURCE_EXHAUSTED: MultiOperation could not be executed.
at callErrorFromStatus
at Object.onReceiveStatus
// ...
even though error.message
contains:
limit on number of concurrent in-flight updates has been reached (10)
As users generally don't print out error.message
explicitly to their logs, a user is left without a clue of what actually went wrong. A better behavior would be for the error to print out with a composed message, such as:
Error: 8 RESOURCE_EXHAUSTED Update-with-Start could not be executed: limit on number of concurrent in-flight updates has been reached (10)
at callErrorFromStatus
at Object.onReceiveStatus
// ...