Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -139,6 +139,7 @@ func (h *SCIMHandler) BearerTokenMiddleware(next http.Handler) http.Handler {
h.logger.ErrorCtx(r.Context(), "SCIM token validation error", log.Error(err))
httpserver.RenderError(w, http.StatusInternalServerError, errors.New("internal server error"))
return
}
@@ -157,13 +158,17 @@ func (rc *scimRequestContext) logAndWrapError(err error, logMsg string) error {
if scimErr.Status == http.StatusNotFound {
userName = ""
}
rc.handler.handler.iam.SCIMService.LogEvent(rc.ctx, rc.config, rc.method, rc.path, userName, rc.ipAddress, scimErr.Status, &errMsg)
return err
}
rc.handler.handler.logger.ErrorCtx(rc.ctx, logMsg, log.Error(err))
errMsg := "internal server error"
rc.handler.handler.iam.SCIMService.LogEvent(rc.ctx, rc.config, rc.method, rc.path, rc.userName, rc.ipAddress, 500, &errMsg)
return scimerrors.ScimErrorInternal
}
@@ -236,6 +241,7 @@ func (h *scimResourceHandler) GetAll(r *http.Request, params scim.ListRequestPar
}
var filterExpr scimfilter.Expression
if params.FilterValidator != nil {
if err := params.FilterValidator.Validate(); err != nil {
return scim.Page{}, rc.logAndWrapError(scimerrors.ScimErrorBadRequest(err.Error()), "invalid filter")
@@ -250,6 +256,7 @@ func (h *scimResourceHandler) GetAll(r *http.Request, params scim.ListRequestPar
}
rc.logSuccess(200)
return scim.Page{
TotalResults: totalCount,
Resources: resources,