Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptic error messages returned in OK messages #83

Open
boreq opened this issue Nov 24, 2023 · 2 comments
Open

Cryptic error messages returned in OK messages #83

boreq opened this issue Nov 24, 2023 · 2 comments

Comments

@boreq
Copy link

boreq commented Nov 24, 2023

Strfry tends to return cryptic messages in OK messages justifying rejecting events. For example when a p tag doesn't actually contain a hex public key the following message will be returned:

invalid: uneven size input to from_hex

Now this can be deciphered by investigating the event but it would be much better if the error messages were friendlier e.g.:

invalid: event contains a p tag with an invalid public key

@hoytech
Copy link
Owner

hoytech commented Dec 16, 2023

I completely agree with this -- the error messages are pretty terrible. I just need to put the work in to improving this. Right now they are whatever exception messages the various libraries I use throw.

I'll see if I can make some improvements to this for the 1.0 release.

@hoytech
Copy link
Owner

hoytech commented Sep 5, 2024

Next release it will error with: invalid: unexpected size for fixed-size tag: p. If it's exactly 64 characters but it fails on hex decode it will say invalid: unexpected character in from_hex: 122.

Not perfect, but getting better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants