Conversation
5119783 to
4941d68
Compare
npry
left a comment
There was a problem hiding this comment.
Directionally I'm on board, I think the current shape has some awkwardness around the specific composition of structs and enums (mostly in ts_control). The main hangup is that I'm not sure why we're nesting enum-in-enum there. As I mention in one of my comments, it feels to me like it wants to be a struct Error with a flat ErrorKind enum, so I'm curious why you laid it out that way
Yeah, a few places did feel pretty awkward and I definitely think this can be improved.
So the idea here is that the top-level variants for each variant reflect possible recovery strategies - e.g., in ts_control, This could all be better documented! And some of the names can definitely be improved. Hopefully that makes sense why there are nested enums and not a struct. |
|
Latest commit makes some of the suggested changes. I haven't updated docs to correspond or applied suggestions which I'd like to discuss further. |
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Signed-off-by: Nick Cameron <nrc@ncameron.org>
|
Updated the PR following our chat last week. The changes are in a separate commit. I think I got everything we discussed (and comments here), but let me know if I missed anything. I'm much happier with the new errors. There is one question inline (marked There is also one question in a reply above because of my bad memory. |
4ed2420 to
afcf59f
Compare
There was a problem hiding this comment.
bunch of small nits, but the blocker is that imo NetworkError in its various incarnations probably want to split along the lines of issues <= L4 and > L4, i.e. is the network itself down, or is this a higher-layer problem? the former can be handled by retries or possibly out-of-band online checks, where an http 400 or a tls negotiation failure can't be resolved the same way (not retryable). probably this latter case can be handled as an Internal variant for now?
edit: otherwise, lgtm!
Signed-off-by: Nick Cameron <nrc@ncameron.org>
|
@npry all comments addressed. Thank you for helping me iterate on this! |
An attempt at refactoring some of our errors into a more handling-oriented approach. I'm a bit unsure about some of the names, descriptions, and categorisations, so feedback on that stuff in particular (as well as the rest of the approach) would be welcome!