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
My understanding of safe* functions was that they return null when the account does not exist. However, it actually throws an UnexpectedAccountError on the empty buffer.
UnexpectedAccountError: The account at the provided address [3ix9kizh1uKa7PEYhWUHLseMRVMtqgu5eSUTZ6LT3Ezt] is not of the expected type [CandyGuard].
Source: SDK
Caused By: DeserializingEmptyBufferError: Serializer [i8] cannot deserialize empty buffers.
at deserializeAccount (Account.ts:63:11)
at deserializeCandyGuard (candyGuard.ts:90:10)
at safeFetchCandyGuard (candyGuard.ts:125:7)
@metaplex-foundation/mpl-candy-machine v6.0.0
The text was updated successfully, but these errors were encountered:
Hi there, I think this is to do with an account that exists (i.e. had some lamports) but no data. The "safe" part currently doesn't protect you against accounts that exist but don't have the expected data. I'm in two minds whether it should or not.
My understanding of
safe*
functions was that they returnnull
when the account does not exist. However, it actually throws anUnexpectedAccountError
on the empty buffer.@metaplex-foundation/mpl-candy-machine
v6.0.0The text was updated successfully, but these errors were encountered: