Skip to content

api: allow returning -1 in spans, doc HPE_USER#104

Closed
indutny wants to merge 1 commit intomasterfrom
feature/consistent-return-values
Closed

api: allow returning -1 in spans, doc HPE_USER#104
indutny wants to merge 1 commit intomasterfrom
feature/consistent-return-values

Conversation

@indutny
Copy link
Copy Markdown
Member

@indutny indutny commented Apr 19, 2021

HPE_USER return value was allowed in span callbacks (on_body, etc),
but wasn't in the documentation. Additionally, looking at the return
values of other documented callbacks it was easy to assume that -1 was
a valid return value for spans as well. Instead of returning it as it
is change it to HPE_USER and add automatic error reason with the
span's name.

See: envoyproxy/envoy#15814 (comment)

cc @nodejs/http

`HPE_USER` return value was allowed in span callbacks (`on_body`, etc),
but wasn't in the documentation. Additionally, looking at the return
values of other documented callbacks it was easy to assume that `-1` was
a valid return value for spans as well. Instead of returning it as it
is change it to `HPE_USER` and add automatic error reason with the
span's name.
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

indutny added a commit that referenced this pull request Apr 20, 2021
`HPE_USER` return value was allowed in span callbacks (`on_body`, etc),
but wasn't in the documentation. Additionally, looking at the return
values of other documented callbacks it was easy to assume that `-1` was
a valid return value for spans as well. Instead of returning it as it
is change it to `HPE_USER` and add automatic error reason with the
span's name.

PR-URL: #104
Reviewed-By: Daniele Belardi <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
@indutny
Copy link
Copy Markdown
Member Author

indutny commented Apr 20, 2021

Landed in 1340b32, thanks everyone!

@indutny indutny closed this Apr 20, 2021
@indutny indutny deleted the feature/consistent-return-values branch April 20, 2021 19:12
AdamMajer pushed a commit to AdamMajer/llhttp that referenced this pull request Apr 12, 2024
`HPE_USER` return value was allowed in span callbacks (`on_body`, etc),
but wasn't in the documentation. Additionally, looking at the return
values of other documented callbacks it was easy to assume that `-1` was
a valid return value for spans as well. Instead of returning it as it
is change it to `HPE_USER` and add automatic error reason with the
span's name.

PR-URL: nodejs#104
Reviewed-By: Daniele Belardi <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
elijah-charbel added a commit to elijah-charbel/llhttp that referenced this pull request Jul 29, 2025
`HPE_USER` return value was allowed in span callbacks (`on_body`, etc),
but wasn't in the documentation. Additionally, looking at the return
values of other documented callbacks it was easy to assume that `-1` was
a valid return value for spans as well. Instead of returning it as it
is change it to `HPE_USER` and add automatic error reason with the
span's name.

PR-URL: nodejs/llhttp#104
Reviewed-By: Daniele Belardi <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
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.

4 participants