Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ func (op *OIDCProvider) fetchCustomProviderConfig(ctx context.Context, discovery
}

if err := base.JSONUnmarshal(bodyBytes, &metadata); err != nil {
err = base.ErrInvalidJSON
base.InfofCtx(ctx, base.KeyAuth, "Error parsing body during discovery sync: %v", err)
return ProviderMetadata{}, MaxProviderConfigSyncInterval, false, err
}
Expand Down
6 changes: 5 additions & 1 deletion base/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ var (

// ErrMaxSequenceReleasedExceeded is returned when the maximum number of sequences to be released as part of nextSequenceGreaterThan is exceeded
ErrMaxSequenceReleasedExceeded = &sgError{"Maximum number of sequences to release to catch up with document sequence exceeded"}

// ErrInvalidJSON is returned when the JSON being unmarshalled cannot be parsed.
ErrInvalidJSON = HTTPErrorf(http.StatusBadRequest, "Invalid JSON")
)

func (e *sgError) Error() string {
Expand Down Expand Up @@ -249,7 +252,8 @@ func IsTemporaryKvError(err error) bool {
gocb.ErrTimeout, // SDK op timeout. Wrapped by gocb.ErrAmbiguousTimeout, gocb.ErrUnambiguousTimeout,
gocb.ErrOverload, // SDK client-side pipeline queue full, request was not submitted to server
gocb.ErrTemporaryFailure, // Couchbase Server returned temporary failure error
gocb.ErrCircuitBreakerOpen} // SDK client-side circuit breaker blocked request
gocb.ErrCircuitBreakerOpen, // SDK client-side circuit breaker blocked request
}

// iterate through to check incoming error is one of them
for _, tempKVErr := range temporaryKVError {
Expand Down
Loading