mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
@@ -104,6 +104,9 @@ const (
|
||||
// JSConsumerInvalidSamplingErrF failed to parse consumer sampling configuration: {err}
|
||||
JSConsumerInvalidSamplingErrF ErrorIdentifier = 10095
|
||||
|
||||
// JSConsumerMaxDeliverBackoffErr max deliver is required to be > length of backoff values
|
||||
JSConsumerMaxDeliverBackoffErr ErrorIdentifier = 10116
|
||||
|
||||
// JSConsumerMaxPendingAckPolicyRequiredErr consumer requires ack policy for max ack pending
|
||||
JSConsumerMaxPendingAckPolicyRequiredErr ErrorIdentifier = 10082
|
||||
|
||||
@@ -383,6 +386,7 @@ var (
|
||||
JSConsumerInvalidDeliverSubject: {Code: 400, ErrCode: 10112, Description: "invalid push consumer deliver subject"},
|
||||
JSConsumerInvalidPolicyErrF: {Code: 400, ErrCode: 10094, Description: "{err}"},
|
||||
JSConsumerInvalidSamplingErrF: {Code: 400, ErrCode: 10095, Description: "failed to parse consumer sampling configuration: {err}"},
|
||||
JSConsumerMaxDeliverBackoffErr: {Code: 400, ErrCode: 10116, Description: "max deliver is required to be > length of backoff values"},
|
||||
JSConsumerMaxPendingAckPolicyRequiredErr: {Code: 400, ErrCode: 10082, Description: "consumer requires ack policy for max ack pending"},
|
||||
JSConsumerMaxRequestBatchNegativeErr: {Code: 400, ErrCode: 10114, Description: "consumer max request batch needs to be > 0"},
|
||||
JSConsumerMaxRequestExpiresToSmall: {Code: 400, ErrCode: 10115, Description: "consumer max request expires needs to be >= 1ms"},
|
||||
@@ -843,6 +847,16 @@ func NewJSConsumerInvalidSamplingError(err error, opts ...ErrorOption) *ApiError
|
||||
}
|
||||
}
|
||||
|
||||
// NewJSConsumerMaxDeliverBackoffError creates a new JSConsumerMaxDeliverBackoffErr error: "max deliver is required to be > length of backoff values"
|
||||
func NewJSConsumerMaxDeliverBackoffError(opts ...ErrorOption) *ApiError {
|
||||
eopts := parseOpts(opts)
|
||||
if ae, ok := eopts.err.(*ApiError); ok {
|
||||
return ae
|
||||
}
|
||||
|
||||
return ApiErrors[JSConsumerMaxDeliverBackoffErr]
|
||||
}
|
||||
|
||||
// NewJSConsumerMaxPendingAckPolicyRequiredError creates a new JSConsumerMaxPendingAckPolicyRequiredErr error: "consumer requires ack policy for max ack pending"
|
||||
func NewJSConsumerMaxPendingAckPolicyRequiredError(opts ...ErrorOption) *ApiError {
|
||||
eopts := parseOpts(opts)
|
||||
|
||||
Reference in New Issue
Block a user