You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
My main purpose of using serializeError is to get cause. it works perfectly but I get a following error
Property 'cause' does not exist on type 'Json & ExactOptionalGuard'.
What would be the appropriate type of it? My code is below:
consterr=serializeError(e);// 'e' from smart contract errorconstcause=err?.data?.cause?.reason;// Property 'cause' does not exist on type 'Json & ExactOptionalGuard'
The text was updated successfully, but these errors were encountered:
Hi @Taewa, it's possible for data to not contain a cause property, so you have to check for the existence of this property first before attempting to access it.
Hi,
My main purpose of using
serializeError
is to getcause
. it works perfectly but I get a following errorProperty 'cause' does not exist on type 'Json & ExactOptionalGuard'
.What would be the appropriate type of it? My code is below:
The text was updated successfully, but these errors were encountered: