Skip to content

Commit

Permalink
chore: add link
Browse files Browse the repository at this point in the history
  • Loading branch information
VihasMakwana committed Nov 16, 2024
1 parent ee9547c commit c14e99c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/coreinternal/errorutil/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ func HTTPError(w http.ResponseWriter, err error) {
}

func GetHTTPStatusCodeFromError(err error) int {
// See requirements for receviers
// https://github.com/open-telemetry/opentelemetry-collector/blob/8e522ad950de6326a0841d7e1bef808bbc0d3537/receiver/doc.go#L10-L29

// See https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1
// to see a list of retryable http status codes.

// non-retryable status
status := http.StatusBadRequest
if !consumererror.IsPermanent(err) {
Expand Down

0 comments on commit c14e99c

Please sign in to comment.