392
ctx context.Context,
393
message *protocolpb.Message,
395
>
protocolType, msgType, err := protocol.Identify(message)
396
>
if err != nil {
397
return serviceerror.NewInvalidArgument(err.Error())
398
}
400
>
// TODO (alex-update): Should use MessageTypeTag here but then it needs to be another metric name too.
401
>
metrics.CommandTypeTag(msgType.String()),
402
>
proto.Size(message.Body),
403
>
fmt.Sprintf("Message type %v exceeds size limit.", msgType),
404
>
); err != nil {
405
return handler.terminateWorkflow(enumspb.WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE, err)
406
}