Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

cmd/trace-agent: provide a better error when decoding fails #414

Merged
merged 1 commit into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/trace-agent/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ func (r *HTTPReceiver) logStats() {
}

// Languages returns the list of the languages used in the traces the agent receives.
// Eventually this list will be send to our backend through the payload header.
func (r *HTTPReceiver) Languages() string {
// We need to use this map because we can have several tags for a same language.
langs := make(map[string]bool)
Expand Down
2 changes: 1 addition & 1 deletion cmd/trace-agent/receiver_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func HTTPFormatError(tags []string, w http.ResponseWriter) {
func HTTPDecodingError(err error, tags []string, w http.ResponseWriter) {
status := http.StatusBadRequest
errtag := "decoding-error"
msg := errtag
msg := err.Error()

if err == model.ErrLimitedReaderLimitReached {
status = http.StatusRequestEntityTooLarge
Expand Down