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

cleanup(httpapi): remove optional logging-related complexity #1008

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Dec 14, 2022

Checklist

Description

  1. we don't care this much about body logging that we need to have a specific test making sure we actually log the bodies. If we break body logging by incident, that's annoying but not really bad. In exchange, we remove the most complex test of this package.

  2. it's pointless to log that the content-type header is not the expected one when expecting JSON. In case of parsing failure, the user could use -v to turn on verbose mode and see logs. Hence, we don't need to be this picky and this also allows us to zap some extra code and testing complexity.

  3. while there, avoid using |foo| in documentation comments because the proper form is actually [foo].

All this work is really just yak shaving to reduce the noise in a diff for ooni/probe#2372.

1. we don't care _this much_ about body logging that we need to have
a specific test making sure we _actually_ log the bodies. If we break
body logging by incident, that's annoying but not really bad. In
exchange, we remove the most complex test of this package.

2. it's pointless to log that the content-type header is not the
expected one when expecting JSON. In case of parsing failure, the
user could use `-v` to turn on verbose mode and see logs. Hence,
we don't need to be this picky and this also allows us to zap some
extra code and testing complexity.

3. while there, avoid using `|foo|` in documentation comments
because the proper form is actually `[foo]`.

All this work is really just yak shaving to reduce the noise in a
diff for ooni/probe#2372.
@bassosimone bassosimone requested a review from hellais as a code owner December 14, 2022 11:04
@bassosimone bassosimone merged commit 4f4e56b into master Dec 14, 2022
@bassosimone bassosimone deleted the typedcall branch December 14, 2022 11:12
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.

1 participant