There is a thrown XAException which is then reported from WFTC to Narayana. See: https://github.com/wildfly/wildfly-http-client/blob/1.1.6.Final/transaction/src/main/java/org/wildfly/httpclient/transaction/HttpRemoteTransactionPeer.java#L72
The XAExeption is initialized without any error code so it will be handled by TM as a heuristic result.
Both error code and cause should be initialized when creating XAException
More information, please refer to https://wildfly.zulipchat.com/#narrow/stream/185713-ejb/topic/XAException.20used.20in.20wildfly-http-client/near/229813562