keriox icon indicating copy to clipboard operation
keriox copied to clipboard

At least include the originator of the error when doing parse::signed_event_stream_validate

Open blelump opened this issue 4 years ago • 1 comments

When an error appears in https://github.com/decentralized-identity/keriox/blob/master/src/event_message/parse.rs#L115, the original cause is being forgotten as generic lambda input variable _. End result is:

Err(Error(("{\"vs\":\"KERI10JSON00012a_\",\"pre\":\"E4_CHZxqydVAvJEI7beqk3TZwUR92nQydi1nI8UqUTxk\",\"sn\":\"0\",\"ilk\
":\"icp\",\"sith\":\"1\",\"keys\":[\"DLfozZ0uGvLED22X3K8lX6ciwhl02jdjt1DQ_EHnJro0\",\"C6KROFI5gWRXhAiIMiHLCDa-Oj09kmVM
r2btCE96k_3g\"],\"nxt\":\"1E99mhvP0pLkGtxymQkspRqcdoIFOqdigCf_F3rpg7rfk\",\"toad\":\"0\",\"wits\":[],\"cnfg\":[]}-AABA
AlxZyoxbADu-x9Ho6EC7valjC4bNn7muWvqC_u0EBd1P9xIeOSxmcYdhyvBg1-o-25ebv66Q3Td5bZ730wqLjBA", Verify))) 

and it doesn't help with finding the underlying cause.

blelump avatar Oct 25 '20 18:10 blelump

this can be improved via one of the techniques described in nom error management

it depends how much error info vs performance required.

35359595 avatar May 05 '21 12:05 35359595