Summary
Due to the way the order update flow is executed from any status to canceled, it is possible that the Order system takes a while to register the CancelReason in the order json, causing a brief inconsistency scenario if the Json is consulted or used a few seconds after the cancel action;
A practical example is the use of this field in the vtexcommerce-order-cancelled
template, because as the save process may take a while it is possible that the email sending will not deliver this data to the end user because the email sending is asynchronous to the cancellation flow;
Simulation
not possible to simulate it.
But it can be observed in the timeline of a canceled order, once that the cancellationReason
property is used in the store template.
Workaround
In case the failure impacts the get order process, we recommend that a new get be made;