Solve pending TODO HS issues with TorAddrError::BadOnion
Currently, our comments indicate that we think that TorAddrError::BadOnion
should contain a HsIdParseError
, but it doesn't, because HsIdParseError
is not PartialEq
.
Another complicating issue is that TorAddrError
is a public part of the arti_client
API: it isn't opaque like arti_client::Error
is. That means we need to be really careful what we add to it.
I am calling this a Blocker since it's a top-level API issue.
So, here's my proposed "least-bad, not very breaking" solution:
- Include
HsIdParseError
inTorAddrError::BadOnion
. - Refactor
HsIdParseError
to not exposetor_bytes::Error
ordata_encoding::EncodeError
. This is the "bad" part. - Add comments to
HsIdParseError
andTorAddrError
reminding the developer that these are part of ourarti_client
API and we need to be careful what we put in them.