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

Fix for #1976 #2053

Merged
merged 1 commit into from Apr 1, 2021
Merged

Fix for #1976 #2053

merged 1 commit into from Apr 1, 2021

Conversation

derekcollison
Copy link
Member

Signed-off-by: Derek Collison derek@nats.io

/cc @nats-io/core

Signed-off-by: Derek Collison <derek@nats.io>
@@ -2351,7 +2352,7 @@ func (s *Server) jsMsgGetRequest(sub *subscription, c *client, subject, reply st

subj, hdr, msg, ts, err := mset.store.LoadMsg(req.Seq)
if err != nil {
resp.Error = jsError(err)
resp.Error = jsNoMessageFoundErr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, i mean LoadMsg can fail for many reasons, perhaps LoadMsg should return a specific error for not found vs other kinds of failure - if it can detect it, then we can have 404 and 500 appropriately?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the others are captured above. This is what we do for a pull consumer also, essentially turn everything into a not found error.

Copy link
Contributor

@ripienaar ripienaar Apr 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Consistency matters most then. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants