Skip to content

Commit 8ff4a29

Browse files
committed
Add missing .Error() calls
1 parent 7762358 commit 8ff4a29

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ func main() {
3737
if healthEndpoint := os.Getenv("FIRETAIL_API_URL_HEALTH"); healthEndpoint != "" {
3838
resp, err := http.Get(healthEndpoint)
3939
if err != nil {
40-
log.Println("Error making request to health endpoint:", err)
40+
log.Println("Error making request to health endpoint:", err.Error())
4141
} else {
4242
defer resp.Body.Close()
4343
healthResponse, err := ioutil.ReadAll(resp.Body)
4444
if err != nil {
45-
log.Println("Error reading health endpoint response:", err)
45+
log.Println("Error reading health endpoint response:", err.Error())
4646
} else {
4747
log.Println("Health endpoint response:", strconv.Itoa(resp.StatusCode), string(healthResponse))
4848
}

proxy/proxy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,18 @@ func (p *ProxyServer) recordAssembler() {
146146

147147
eventBody, err := io.ReadAll(event.Body)
148148
if err != nil {
149-
log.Println("Error reading event body:", err)
149+
log.Println("Error reading event body:", err.Error())
150150
continue
151151
}
152152
responseBody, err := io.ReadAll(lambdaResponse.Body)
153153
if err != nil {
154-
log.Println("Error reading response body:", err)
154+
log.Println("Error reading response body:", err.Error())
155155
continue
156156
}
157157

158158
var recordResponse firetail.RecordResponse
159159
if err := json.Unmarshal(responseBody, &recordResponse); err != nil {
160-
log.Println("Error unmarshalling response body:", err)
160+
log.Println("Error unmarshalling response body:", err.Error())
161161
continue
162162
}
163163

0 commit comments

Comments
 (0)