Add common error user not public
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -9,3 +9,4 @@ common:
|
|||||||
database: "00006"
|
database: "00006"
|
||||||
missing_user_id: "00007"
|
missing_user_id: "00007"
|
||||||
user_not_found: "00008"
|
user_not_found: "00008"
|
||||||
|
user_not_public: "00009"
|
||||||
|
|||||||
@@ -71,13 +71,13 @@ func (self *UserServiceImpl) GetUserInfo(payload *UserInfoPayload) (result *User
|
|||||||
SetService(exception.ServiceUser).
|
SetService(exception.ServiceUser).
|
||||||
SetEndpoint(exception.EndpointUserServiceInfo).
|
SetEndpoint(exception.EndpointUserServiceInfo).
|
||||||
SetType(exception.TypeCommon).
|
SetType(exception.TypeCommon).
|
||||||
SetOriginal(exception.CommonErrorUserNotFound).
|
SetOriginal(exception.CommonErrorUserNotPublic).
|
||||||
SetError(err).
|
SetError(err).
|
||||||
Throw(payload.Context)
|
Throw(payload.Context)
|
||||||
|
|
||||||
result = &UserInfoResult{
|
result = &UserInfoResult{
|
||||||
Common: shared.CommonResult{
|
Common: shared.CommonResult{
|
||||||
HttpCode: 404,
|
HttpCode: 403,
|
||||||
Exception: exception,
|
Exception: exception,
|
||||||
},
|
},
|
||||||
Data: nil,
|
Data: nil,
|
||||||
|
|||||||
Reference in New Issue
Block a user