-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
ValidationError
& ValidationErrorKind::Invalid
is useless without information of what the invalid value and what type was expected
#606
Comments
These are the server/client transactions intermixed with error/trace logs that prompted this post, for posterity:
|
These... are not well thought-out :-) We can review and refactor for v2.0.0! The error message is really not great. |
@duesee any clue what part of that imap session would trigger this error? |
I just tried throwing the responses into the corresponding examples. I may have overlooked something, but for me, it seems like @duesee Does the crate already fully implement RFC 4551 (IMAP Extension for Conditional STORE Operation or Quick Flag Changes Resynchronization)? (see https://www.rfc-editor.org/rfc/rfc4551.html#section-3.3.2 for the FETCH response) (I tried enabling the @epilys As we cannot see this on the log snippet: Did the client command include a |
@HenningHolmDE The command did include the |
@epilys I think that the error tells that some data meli wanted to put into a command is invalid. imap-codec then refuses to create such a command with this error. |
Ugh, looked at it again and it seems like instead of calculating a message sequence set compared to the previous
So in this case the error must have been that a |
Makes sense! |
I'll try to see how we could have done this obvious in the first place, like, better error message :-) |
It should show
|
ValidationError
&ValidationErrorKind::Invalid
is useless without information of what the invalid value and what type was expected.Both types derive traits which would break if we added extra information:
imap-codec/imap-types/src/error.rs
Lines 9 to 13 in 086523d
But is a validation error really equal to another validation error if the value domain and/or the value are different? 🤔 Do these errors need to be hashable/orderable/comparable?
The text was updated successfully, but these errors were encountered: