-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgiantswarmerror.cpp
44 lines (30 loc) · 1.08 KB
/
giantswarmerror.cpp
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
#include <QString>
#include "giantswarmerror.hpp"
using namespace Bidstack::Giantswarm;
QString GiantswarmError::errorString() const {
switch (error) {
case InvalidJsonFromCache:
return "Received invalid JSON from cache!";
case InvalidJsonFromAPI:
return "Received invalid JSON from API!";
case NotAllowedToRequestURI:
return "Not allowed to request given URI!";
case ClientError:
return "An client error occurred!";
case ServerError:
return "An server error occurred!";
case ResponseContainsRedirection:
return "Response contains unhandled redirection!";
case NotFound:
return "Requested URI not found!";
case UnexpectedResponseStatus:
return "Unexpected response status!";
case LoginRequired:
return "Login required!";
case LogoutRequired:
return "Logout required!";
case ResponseStatusMismatch:
return "Received status_code does not match expected status!";
}
return QString();
}