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

@@ -89,6 +89,7 @@ func toOAuth2Error(err error) *oauth2server.OAuth2Error {
if oauthErr, ok := errors.AsType[*oauth2server.OAuth2Error](err); ok {
return oauthErr
}
return oauth2server.NewError(oauth2server.ErrServerError, oauth2server.WithDescription("internal error"))
}
}
@@ -108,12 +109,15 @@ func redirectWithError(w http.ResponseWriter, r *http.Request, redirectURI, stat
q := u.Query()
q.Set("error", oauthErr.ErrorCode())
if desc := oauthErr.Description(); desc != "" {
q.Set("error_description", desc)
}
if state != "" {
q.Set("state", state)
}
u.RawQuery = q.Encode()
http.Redirect(w, r, u.String(), http.StatusFound)