These errors were producing the wrong status code,
changing to 503.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -64,6 +64,8 @@ func GetHTTPErrorStatusCode(err error) int {
|
| 64 | 64 |
{"unauthorized", http.StatusUnauthorized},
|
| 65 | 65 |
{"hasn't been activated", http.StatusForbidden},
|
| 66 | 66 |
{"this node", http.StatusServiceUnavailable},
|
| 67 |
+ {"needs to be unlocked", http.StatusServiceUnavailable},
|
|
| 68 |
+ {"certificates have expired", http.StatusServiceUnavailable},
|
|
| 67 | 69 |
} {
|
| 68 | 70 |
if strings.Contains(errStr, status.keyword) {
|
| 69 | 71 |
statusCode = status.code |