mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
GODT-1358: Fix wording
This commit is contained in:
@ -28,6 +28,7 @@ var (
|
||||
ErrBad2FACodeTryAgain = errors.New("incorrect 2FA code: please try again")
|
||||
|
||||
ErrPaidPlanRequired = errors.New("paid subscription plan is required")
|
||||
ErrPasswordWrong = errors.New("wrong password")
|
||||
)
|
||||
|
||||
type ErrUnprocessableEntity struct {
|
||||
|
||||
@ -31,6 +31,7 @@ import (
|
||||
|
||||
const (
|
||||
errCodeUpgradeApplication = 5003
|
||||
errCodePasswordWrong = 8002
|
||||
errCodeAuthPaidPlanRequired = 10004
|
||||
)
|
||||
|
||||
@ -61,6 +62,8 @@ func (m *manager) catchAPIError(_ *resty.Client, res *resty.Response) error {
|
||||
if m.cfg.UpgradeApplicationHandler != nil {
|
||||
m.cfg.UpgradeApplicationHandler()
|
||||
}
|
||||
case apiErr.Code == errCodePasswordWrong:
|
||||
err = ErrPasswordWrong
|
||||
case apiErr.Code == errCodeAuthPaidPlanRequired:
|
||||
err = ErrPaidPlanRequired
|
||||
case res.StatusCode() == http.StatusUnprocessableEntity:
|
||||
|
||||
Reference in New Issue
Block a user