fix status-code for "locked" swarm and "certificate expired"
(cherry picked from commit 6486924f0b6464a90c9c2d251a3ab0a96302dce9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -63,6 +63,8 @@ func GetHTTPErrorStatusCode(err error) int {
|
| 63 | 63 |
{"unauthorized", http.StatusUnauthorized},
|
| 64 | 64 |
{"hasn't been activated", http.StatusForbidden},
|
| 65 | 65 |
{"this node", http.StatusServiceUnavailable},
|
| 66 |
+ {"needs to be unlocked", http.StatusServiceUnavailable},
|
|
| 67 |
+ {"certificates have expired", http.StatusServiceUnavailable},
|
|
| 66 | 68 |
} {
|
| 67 | 69 |
if strings.Contains(errStr, status.keyword) {
|
| 68 | 70 |
statusCode = status.code |