Skip to content

Commit

Permalink
Improve error message for JSConsumerPullRequiresAckErr (#5678)
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <[email protected]>
  • Loading branch information
derekcollison authored Jul 22, 2024
2 parents 181e79d + 6c7d237 commit 2303592
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@
"constant": "JSConsumerPullRequiresAckErr",
"code": 400,
"error_code": 10084,
"description": "consumer in pull mode requires ack policy",
"description": "consumer in pull mode requires ack policy on workqueue stream",
"comment": "",
"help": "",
"url": "",
Expand Down
6 changes: 3 additions & 3 deletions server/jetstream_errors_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const (
// JSConsumerPullNotDurableErr consumer in pull mode requires a durable name
JSConsumerPullNotDurableErr ErrorIdentifier = 10085

// JSConsumerPullRequiresAckErr consumer in pull mode requires ack policy
// JSConsumerPullRequiresAckErr consumer in pull mode requires ack policy on workqueue stream
JSConsumerPullRequiresAckErr ErrorIdentifier = 10084

// JSConsumerPullWithRateLimitErr consumer in pull mode can not have rate limit set
Expand Down Expand Up @@ -521,7 +521,7 @@ var (
JSConsumerOnMappedErr: {Code: 400, ErrCode: 10092, Description: "consumer direct on a mapped consumer"},
JSConsumerOverlappingSubjectFilters: {Code: 400, ErrCode: 10138, Description: "consumer subject filters cannot overlap"},
JSConsumerPullNotDurableErr: {Code: 400, ErrCode: 10085, Description: "consumer in pull mode requires a durable name"},
JSConsumerPullRequiresAckErr: {Code: 400, ErrCode: 10084, Description: "consumer in pull mode requires ack policy"},
JSConsumerPullRequiresAckErr: {Code: 400, ErrCode: 10084, Description: "consumer in pull mode requires ack policy on workqueue stream"},
JSConsumerPullWithRateLimitErr: {Code: 400, ErrCode: 10086, Description: "consumer in pull mode can not have rate limit set"},
JSConsumerPushMaxWaitingErr: {Code: 400, ErrCode: 10080, Description: "consumer in push mode can not set max waiting"},
JSConsumerReplacementWithDifferentNameErr: {Code: 400, ErrCode: 10106, Description: "consumer replacement durable config not the same"},
Expand Down Expand Up @@ -1271,7 +1271,7 @@ func NewJSConsumerPullNotDurableError(opts ...ErrorOption) *ApiError {
return ApiErrors[JSConsumerPullNotDurableErr]
}

// NewJSConsumerPullRequiresAckError creates a new JSConsumerPullRequiresAckErr error: "consumer in pull mode requires ack policy"
// NewJSConsumerPullRequiresAckError creates a new JSConsumerPullRequiresAckErr error: "consumer in pull mode requires ack policy on workqueue stream"
func NewJSConsumerPullRequiresAckError(opts ...ErrorOption) *ApiError {
eopts := parseOpts(opts)
if ae, ok := eopts.err.(*ApiError); ok {
Expand Down

0 comments on commit 2303592

Please sign in to comment.