fix(http): don't 400 when auth GET decoration fails

pull/13589/head
Jade McGough 2019-04-23 14:12:07 -07:00
parent 17caffe309
commit 0124a0c669
1 changed files with 4 additions and 4 deletions

View File

@ -333,14 +333,14 @@ func (h *AuthorizationHandler) handleGetAuthorizations(w http.ResponseWriter, r
for i, a := range as {
o, err := h.OrganizationService.FindOrganizationByID(ctx, a.OrgID)
if err != nil {
EncodeError(ctx, err, w)
return
h.Logger.Info("failed to get organization", zap.String("handler", "getAuthorizations"), zap.String("orgID", a.OrgID.String()), zap.Error(err))
continue
}
u, err := h.UserService.FindUserByID(ctx, a.UserID)
if err != nil {
EncodeError(ctx, err, w)
return
h.Logger.Info("failed to get user", zap.String("handler", "getAuthorizations"), zap.String("userID", a.UserID.String()), zap.Error(err))
continue
}
ps, err := newPermissionsResponse(ctx, a.Permissions, h.LookupService)