Open agcom opened 4 months ago
I also have two other side-queries (asking for opinions):
strconv.ParseUint
), but the returned error is kinda irrelevant (expected number, got ")"
). Is it possible to propagate the conversion error (regarding the library's design and access to setting the decoder error down the functions' call chain)?Why the Collect() method won't return an error?
Sounds like a bug.
Is it possible to propagate the conversion error (regarding the library's design and access to setting the decoder error down the functions' call chain)?
It should be possible via Decoder.returnErr
, yeah.
That number anomaly caused by the misbehaving IMAP server blows the whole client up; is it possible to add a logic that tries to recover from these anomalies instead of closing the client?
That's tricky. It's dangerous to try to recover from any error, because we might've dropped important messages and our state might become out-of-sync. We could try to special-case specifically overflow errors.
I encountered a misbehaving IMAP server in which a response has a bad impossible big number:
Now assume the following example application that interacts with the misbehaving IMAP server:
The output of running the application is:
You can see that the
fetchCmd.Next().Collect()
did not return an error, but the returned message buffer does not contain the requested data. Why theCollect()
method won't return an error? Is it a pattern to always successfully close the fetch command before trusting the fetched objects?