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
This will only throw an error, seemingly without any obvious resolution.
Error: Cannot find field hash _3456837_
at VariantClass.decodeValue (.../@dfinity/candid/src/idl.ts:1018:11)
Describe the solution you'd like
One way to improve errors is to print the raw candid response along with our type:
Error: Unexpected field hash _3456837_. Did you forget to include a variant?
Received raw candid:
[
{
"_3456837_": {
"_1389388560_": "",
"_3790638545_": 3
}
}
]
Provided type:
variant {Invalid:null}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
This is an issue with
@dfinity/candid
.In general, candid decoding errors only throw an error and are not very descriptive.
Example
This is an example of a candid interface with missing variants.
This will only throw an error, seemingly without any obvious resolution.
Describe the solution you'd like
One way to improve errors is to print the raw candid response along with our type:
The text was updated successfully, but these errors were encountered: