diff --git a/handler/oauth2/flow_refresh.go b/handler/oauth2/flow_refresh.go index 78a63bdec..744864764 100644 --- a/handler/oauth2/flow_refresh.go +++ b/handler/oauth2/flow_refresh.go @@ -66,7 +66,7 @@ func (c *RefreshTokenGrantHandler) HandleTokenEndpointRequest(ctx context.Contex if errors.Is(err, fosite.ErrInactiveToken) { // Detected refresh token reuse if rErr := c.handleRefreshTokenReuse(ctx, signature, originalRequest); rErr != nil { - return errorsx.WithStack(fosite.ErrServerError.WithWrap(rErr).WithDebug(rErr.Error())) + return errorsx.WithStack(rErr) } return errorsx.WithStack(fosite.ErrInactiveToken.WithWrap(err).WithDebug(err.Error()))