Skip to content

Commit

Permalink
return details of authorization error
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Mar 7, 2024
1 parent 0d57fd7 commit dd01daf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/cert_manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import (
"encoding/pem"
"errors"
"fmt"
"github.com/rekby/safemutex"
"net/http"
"reflect"
"strings"
"sync"
"time"

"github.com/rekby/safemutex"

"github.com/rekby/lets-proxy2/internal/domain"

"github.com/rekby/lets-proxy2/internal/contexthelper"
Expand All @@ -32,9 +33,10 @@ import (

"golang.org/x/xerrors"

"github.com/rekby/lets-proxy2/internal/cache"
"go.uber.org/zap/zapcore"

"github.com/rekby/lets-proxy2/internal/cache"

"github.com/rekby/lets-proxy2/internal/log"

zc "github.com/rekby/zapcontext"
Expand Down Expand Up @@ -434,7 +436,7 @@ func (m *Manager) createOrderAndCertificate(ctx context.Context, acmeClient Acme
order, err := m.createOrderForDomains(ctx, acmeClient, domainNames...)
log.DebugWarning(logger, err, "Domains authorized")
if err != nil {
return nil, errors.New("order authorization error")
return nil, fmt.Errorf("order authorization error: %+v", err)
}

res, err := m.issueCertificate(ctx, acmeClient, cd, order)
Expand Down

0 comments on commit dd01daf

Please sign in to comment.