Enhanced the eraser detector to handle new status code from verification API (#3342)

This commit is contained in:
Kashif Khan 2024-09-27 21:32:58 +05:00 committed by GitHub
parent ee51fc5cc4
commit 49cb9d395d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,8 +94,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
switch res.StatusCode {
case http.StatusOK:
return true, nil, nil
case http.StatusNotFound:
// 404 API token not found
case http.StatusUnauthorized:
// 401 API token unauthorized
// The secret is determinately not verified (nothing to do)
return false, nil, nil
default: