convex icon indicating copy to clipboard operation
convex copied to clipboard

Unexpected Error: `blob` with odd-length hexstring

Open helins opened this issue 4 years ago • 3 comments
trafficstars

Calling blob with a hexstring of odd length results in a fatal error and breaks the executing account.

Screenshot from 2021-04-21 19-38-54

helins avatar Apr 21 '21 17:04 helins

Believe this is now fixed in latest master with commit 78270113d4db92c65aebfc9d2d613bd600135679

mikera avatar Apr 25 '21 09:04 mikera

Looks fixed in the sense that it outputs a CAST error but then it looks like all strings cannot be cast to Blob (whereas it is just about odd-length ones).

helins avatar Apr 27 '21 09:04 helins

Hmmm tricky one. I think a :CAST error is appropriate if any explicit casting operation fails, but I see the case for :ARGUMENT. Will leave open for now.

mikera avatar Jun 02 '21 01:06 mikera

I believe this has been resolved in recent releases. We are sticking with :CAST for now because it is a failed cast, and this is probably the most useful error.

mikera avatar Apr 28 '23 10:04 mikera