feat(errorsx): cover more syscall errors and add tests (#430)
* feat(errorsx): cover more syscall errors and add tests Part of https://github.com/ooni/probe/issues/1505 * fix tests
This commit is contained in:
parent
3747598b4a
commit
14c1640f7f
7 changed files with 293 additions and 48 deletions
|
|
@ -1,14 +1,11 @@
|
|||
package errorsx
|
||||
|
||||
// This enumeration lists all the failures defined at
|
||||
// This enumeration lists the non-syscall-derived failures defined at
|
||||
// https://github.com/ooni/spec/blob/master/data-formats/df-007-errors.md
|
||||
//
|
||||
// See also the enumeration at errno.go for the failures that
|
||||
// derive directly from system call errors.
|
||||
const (
|
||||
// FailureConnectionRefused means ECONNREFUSED.
|
||||
FailureConnectionRefused = "connection_refused"
|
||||
|
||||
// FailureConnectionReset means ECONNRESET.
|
||||
FailureConnectionReset = "connection_reset"
|
||||
|
||||
// FailureDNSBogonError means we detected bogon in DNS reply.
|
||||
FailureDNSBogonError = "dns_bogon_error"
|
||||
|
||||
|
|
@ -21,12 +18,6 @@ const (
|
|||
// FailureGenericTimeoutError means we got some timer has expired.
|
||||
FailureGenericTimeoutError = "generic_timeout_error"
|
||||
|
||||
// FailureHostUnreachable means that there is "no route to host".
|
||||
FailureHostUnreachable = "host_unreachable"
|
||||
|
||||
// FailureInterrupted means that the user interrupted us.
|
||||
FailureInterrupted = "interrupted"
|
||||
|
||||
// FailureNoCompatibleQUICVersion means that the server does not support the proposed QUIC version
|
||||
FailureNoCompatibleQUICVersion = "quic_incompatible_version"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue