errorreporting: pass through the RPC error to OnError
Use the error returned by the RPC, instead of wrapping it with fmt.Errorf.
@@ -109,7 +109,7 @@ func NewClient(ctx context.Context, projectID string, cfg Config, opts ...option
for _, req := range reqs {
_, err = client.apiClient.ReportErrorEvent(ctx, req)
if err != nil {
- client.onError(fmt.Errorf("failed to upload: %v", err))
+ client.onError(err)
}
}
})
