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

maint: Update Husky to handle invalid content type errors #1019

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

MikeGoldsmith
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith commented Feb 29, 2024

Which problem is this PR solving?

Updates Husky to v0.25.1 which includes fixes handling invalid content types for OTLP requests.

See the following PR for changes:

NOTE: This PR is based on an unreleased version of husky. We'll wait for husky to be released before merging this fix.

Short description of the changes

  • Updating Husky to 0.25.1
  • Updating the error handler to use husky to write a text/plain response for invalid content type errors
  • Move validation of API keys from config after request headers check

@MikeGoldsmith MikeGoldsmith added version: bump patch A PR with release-worthy changes and is backwards-compatible. type: maintenance The necessary chores to keep the dust off. labels Feb 29, 2024
@MikeGoldsmith MikeGoldsmith self-assigned this Feb 29, 2024
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner February 29, 2024 11:21
}
} else {
// Since we have an invalid content type for an OTLP HTTP response we choose to use to text/plain
if err := husky.WriteOtlpHttpFailureResponse(w, req, otlpErr); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the error here always a content type error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, API key missing or invalid errors are also possible to come through here

Copy link
Contributor

Choose a reason for hiding this comment

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

right, the description says it will use plain for content type errors, but this changes the behaviour for all errors?

@robbkidd robbkidd merged commit 25a474e into main Mar 1, 2024
3 checks passed
@robbkidd robbkidd deleted the mike/husky-otlp-errors branch March 1, 2024 13:16
@robbkidd robbkidd mentioned this pull request Mar 1, 2024
robbkidd added a commit that referenced this pull request Mar 1, 2024
## Which problem is this PR solving?

- Releasing #1019

## Short description of the changes

- update CHANGELOG and RELEASE_NOTES
- no documentation updates
- no dependency license changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance The necessary chores to keep the dust off. version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants