1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#[derive(Debug, Clone, Serialize, Deserialize, Fail, PartialEq, Eq, Hash)]
pub enum Unexpected {
#[fail(display = "Failed to connect to URL: {}. Details: {}.", _0, _1)]
URLConnectionProblem(String, String),
#[fail(
display = "Expired TLS/SSL Certificate for domain: {}, which is valid only for: {} days.",
_0, _1
)]
TLSDomainExpired(String, i32),
#[fail(
display = "URL: {} has invalid final address: \"{}\". Expected: \"{}\"",
_0, _1, _2
)]
AddressInvalid(String, String, String),
#[fail(display = "Curl handler failure: {}.", _0)]
HandlerFailed(String),
#[fail(display = "URL: {} unavailable. Details: {}", _0, _1)]
OSError(String, String),
#[fail(
display = "URL: {} couldn't be reached in time frame of {} seconds.",
_0, _1
)]
HttpConnectionFailed(String, u64),
#[fail(display = "URL: {} returned error: {}. Expected code: {}.", _0, _1, _2)]
HttpCodeInvalid(String, u32, u32),
#[fail(display = "URL: {} lacks expected content: \"{}\"", _0, _1)]
ContentInvalid(String, String),
#[fail(
display = "URL: {} is unable to pass minimum-content-length expectation! Actual content length: {}. Expected minimum-length: {}.",
_0, _1, _2
)]
ContentLengthInvalid(String, usize, usize),
#[fail(
display = "InternalProtocolProblemFailure on: {}. Details: {}.",
_0, _1
)]
InternalProtocolProblem(String, String),
#[fail(
display = "Failed to parse check input data! Error details: \"{}\".",
_0
)]
CheckParseProblem(String),
#[fail(
display = "Unmatched validation case for: \"{}\". Details: {}.",
_0, _1
)]
UnmatchedValidationCase(String, String),
}