Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for pull consumer on workqueue stream #4728

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/errors.json
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 work-queue stream",
"comment": "",
"help": "",
"url": "",
Expand Down Expand Up @@ -1519,4 +1519,4 @@
"url": "",
"deprecates": ""
}
]
]
6 changes: 3 additions & 3 deletions server/jetstream_errors_generated.go
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 work-queue 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 work-queue 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 work-queue stream"
func NewJSConsumerPullRequiresAckError(opts ...ErrorOption) *ApiError {
eopts := parseOpts(opts)
if ae, ok := eopts.err.(*ApiError); ok {
Expand Down