You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should make sure we review the exception names before releasing 1.0.0 and change them if necessary while it's easy.
Some of the rename suggestions are:
UnsignedMetadataError -> (Metadata)SignatureError: UnsignedMetadataError suggests that there is no Signature, which is not what it is exclusively used for.
BadVersionNumberError -> (Metadata)VersionError contains unnecery prefix Bad which doesn't provide any new information. If it's an error it's logical it's bad.
LengthOrHashMismatchError: seems both over-explicit, and also like it's withholding information because the raiser does know if the length or the hash is the problem ... but maybe that detail is not relevant to the catcher?
a) Split LengthOrHashMismatchError to LengthMismatchError and HashMismatchError
b) rename LengthOrHashMismatchError to (Metadata)ContentError
DownloadLengthMismatchError -> LengthError: We have a good exception message that mentions that this exception while downloading:
The problem is if we rename it to LengthError it can collide with LengthMismatchError from point 3 a)
SlowRetrievalError -> TimeoutError: SlowRetrievalError suggests that an attack is happing, but it could also just be a bad wire. Also, the couple of places where we actually catch an exception and throw SlowRetrievalError are variations of TimeoutError, so renaming SlowRetrievalError to a TimeoutError makes sense.
Together with a couple of the maintainers @jku, @lukpueh and @joshuagl we decided that we won't make any renames for now.
Some of the renames are good but are not worth the trouble.
Description of issue or feature request:
We should make sure we review the exception names before releasing 1.0.0 and change them if necessary while it's easy.
Some of the rename suggestions are:
UnsignedMetadataError
->(Metadata)SignatureError
:UnsignedMetadataError
suggests that there is no Signature, which is not what it is exclusively used for.BadVersionNumberError
->(Metadata)VersionError
contains unnecery prefixBad
which doesn't provide any new information. If it's an error it's logical it's bad.LengthOrHashMismatchError
: seems both over-explicit, and also like it's withholding information because the raiser does know if the length or the hash is the problem ... but maybe that detail is not relevant to the catcher?a) Split
LengthOrHashMismatchError
toLengthMismatchError
andHashMismatchError
b) rename
LengthOrHashMismatchError
to(Metadata)ContentError
DownloadLengthMismatchError
->LengthError
: We have a good exception message that mentions that this exception while downloading:The problem is if we rename it to
LengthError
it can collide withLengthMismatchError
from point 3 a)SlowRetrievalError
->TimeoutError
:SlowRetrievalError
suggests that an attack is happing, but it could also just be a bad wire. Also, the couple of places where we actually catch an exception and throwSlowRetrievalError
are variations ofTimeoutError
, so renamingSlowRetrievalError
to aTimeoutError
makes sense.This issue documents suggestions from comments: #1725 (comment) and #1725 (comment)
The text was updated successfully, but these errors were encountered: