fix lint
This commit is contained in:
parent
5cc7be9abf
commit
c58c5acb9d
@ -3,6 +3,7 @@ package client
|
|||||||
import (
|
import (
|
||||||
"codeword/internal/models"
|
"codeword/internal/models"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@ -53,7 +54,7 @@ func (a *AuthClient) RefreshAuthToken(userID, signature string) (*models.Refresh
|
|||||||
if statusCode != fiber.StatusOK {
|
if statusCode != fiber.StatusOK {
|
||||||
errorMessage := fmt.Sprintf("received an incorrect response from the authentication service: %d", statusCode)
|
errorMessage := fmt.Sprintf("received an incorrect response from the authentication service: %d", statusCode)
|
||||||
a.deps.Logger.Error(errorMessage, zap.Int("status", statusCode), zap.String("respBody", string(resBody)), zap.String("UserID", userID), zap.String("sign", signature))
|
a.deps.Logger.Error(errorMessage, zap.Int("status", statusCode), zap.String("respBody", string(resBody)), zap.String("UserID", userID), zap.String("sign", signature))
|
||||||
return nil, fmt.Errorf(errorMessage)
|
return nil, errors.New(errorMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
var tokens models.RefreshResponse
|
var tokens models.RefreshResponse
|
||||||
|
@ -76,7 +76,7 @@ func (r *RecoveryEmailSender) SendRecoveryEmail(email string, signature string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if statusCode != fiber.StatusOK {
|
if statusCode != fiber.StatusOK {
|
||||||
err := fmt.Errorf("the SMTP service returned an error: %s Response body: %s", statusCode, body)
|
err := fmt.Errorf("the SMTP service returned an error: %d Response body: %s", statusCode, body)
|
||||||
r.deps.Logger.Error("Error sending email", zap.Error(err))
|
r.deps.Logger.Error("Error sending email", zap.Error(err))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user