Skip to content

Commit 58a7782

Browse files
committed
Added an HTTP response error.
1 parent 603547c commit 58a7782

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

http/src/network/http/v2/client/client_errors.hpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ namespace network {
3333
// connection
3434
connection_timeout,
3535
https_not_supported,
36+
37+
// response
38+
invalid_version,
39+
invalid_status,
40+
invalid_status_message,
41+
invalid_header,
3642
};
3743

3844
/**
@@ -109,6 +115,26 @@ namespace network {
109115

110116
};
111117

118+
/**
119+
* \ingroup http_client
120+
* \class response_error network/http/v2/client/client_errors.hpp
121+
*/
122+
class response_error : public std::system_error {
123+
124+
public:
125+
126+
/**
127+
* \brief Constructor.
128+
* \param The client_error code.
129+
*/
130+
explicit response_error(client_error error);
131+
132+
/**
133+
* \brief Destructor.
134+
*/
135+
virtual ~response_error() noexcept;
136+
137+
};
112138
} // namespace v2
113139
} // namespace http
114140
} // namespace network

0 commit comments

Comments
 (0)