Update License And partner
This commit is contained in:
@@ -18,6 +18,7 @@ const (
|
||||
errInvalidLogin ErrType = "User email or password is invalid"
|
||||
errUnauthorized ErrType = "Unauthorized"
|
||||
errInsufficientBalance ErrType = "Insufficient Balance"
|
||||
errInactivePartner ErrType = "Partner's license is invalid or has expired. Please contact Admin Support."
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -34,6 +35,7 @@ var (
|
||||
ErrorUserIsNotFound = NewServiceException(errUserIsNotFound)
|
||||
ErrorUserInvalidLogin = NewServiceException(errInvalidLogin)
|
||||
ErrorInsufficientBalance = NewServiceException(errInsufficientBalance)
|
||||
ErrorInvalidLicense = NewServiceException(errInactivePartner)
|
||||
)
|
||||
|
||||
type Error interface {
|
||||
@@ -110,6 +112,9 @@ func (s *ServiceException) MapErrorsToCode() Code {
|
||||
case errInsufficientBalance:
|
||||
return BadRequest
|
||||
|
||||
case errInactivePartner:
|
||||
return BadRequest
|
||||
|
||||
default:
|
||||
return BadRequest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user