-
Notifications
You must be signed in to change notification settings - Fork 0
Improve error messages during check. #119
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| case CBOR.deserialiseFromBytesWithSize CBOR.decodeTerm (BSL.fromStrict bytes) of | ||
| Left err -> failUnpack $ TextError $ "CBOR term deserialisation failed: " <> T.pack (show err) | ||
| Right (_rest, bytesRead, term) -> do | ||
| put (start + fromIntegral bytesRead) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the impact of dropping this line? It doesn't seem related to the error message change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question I think I'll close this PR. And prepare another one
I wanted to write that this line is noop and that's true if everything is correct, however in case if not entire cbor structure is consumed there is a difference, and I think we should just fail here in that case
|
Converting to draft because the question @nc6 asked opens a deeper issue that should be resolved |
Slightly improves error messages in case if check fails. It’s still far from the optimal ones but at least mentions the offset where an error happens