Skip to content

Commit

Permalink
docs: update ExampleWriteAPI_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
karel-rehor committed Aug 9, 2024
1 parent 767aeb8 commit 580d1ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"time"

"github.com/influxdata/influxdb-client-go/v2/api"
apiHttp "github.com/influxdata/influxdb-client-go/v2/api/http"
"github.com/influxdata/influxdb-client-go/v2/api/write"
"github.com/influxdata/influxdb-client-go/v2/domain"
influxdb2 "github.com/influxdata/influxdb-client-go/v2/internal/examples"
Expand Down Expand Up @@ -124,7 +123,7 @@ func ExampleWriteAPI_errors() {
go func() {
for err := range errorsCh {
fmt.Printf("write error: %s\n", err.Error())
fmt.Printf("trace-id: %s\n", err.(*apiHttp.Error).Header.Get("Trace-ID"))
fmt.Printf("trace-id: %s\n", err.(*write.Error).GetHeader("Trace-ID"))
}
}()
// write some points
Expand Down

0 comments on commit 580d1ea

Please sign in to comment.