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

@@ -65,6 +65,7 @@ func handleConnectorInitiate(
httpserver.RenderError(w, http.StatusUnauthorized, fmt.Errorf("authentication required"))
return
}
session := authn.SessionFromContext(r.Context())
if session == nil {
httpserver.RenderError(w, http.StatusUnauthorized, fmt.Errorf("authentication required"))
@@ -94,12 +95,15 @@ func handleConnectorInitiate(
httpserver.RenderError(w, http.StatusBadRequest, fmt.Errorf("cannot reconnect: connector not found"))
return
}
if errors.Is(err, errInvalidReconnectConnector) {
httpserver.RenderError(w, http.StatusBadRequest, err)
return
}
logger.ErrorCtx(r.Context(), "cannot look up existing connector", log.Error(err))
httpserver.RenderError(w, http.StatusInternalServerError, fmt.Errorf("internal error"))
return
}
@@ -118,6 +122,7 @@ func handleConnectorInitiate(
if err != nil {
logger.ErrorCtx(r.Context(), "cannot initiate connector", log.Error(err))
httpserver.RenderError(w, http.StatusInternalServerError, fmt.Errorf("internal error"))
return
}
@@ -147,6 +152,7 @@ func loadExistingConnector(
if err != nil {
return nil, err
}
return found, nil
}
@@ -158,5 +164,6 @@ func loadExistingConnector(
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil, nil
}
return found, err
}