@@ -55,7 +55,7 @@ func (c *Client) createMetricsQuery(query string, quantization time.Duration, fr
55
55
56
56
payload , err := json .Marshal (requestPayload )
57
57
if err != nil {
58
- return nil , fmt .Errorf ("failed to marshal metrics query request: %v " , err )
58
+ return nil , fmt .Errorf ("failed to marshal metrics query request: %w " , err )
59
59
}
60
60
61
61
url := fmt .Sprintf ("%s/%s" , c .config .Host , metricsQueryPath )
@@ -93,7 +93,7 @@ func (c *Client) createMultiMetricsQuery(queries map[string]string, quantization
93
93
94
94
payload , err := json .Marshal (requestPayload )
95
95
if err != nil {
96
- return nil , fmt .Errorf ("failed to marshal metrics query request: %v " , err )
96
+ return nil , fmt .Errorf ("failed to marshal metrics query request: %w " , err )
97
97
}
98
98
99
99
url := fmt .Sprintf ("%s/%s" , c .config .Host , metricsQueryPath )
@@ -103,7 +103,7 @@ func (c *Client) createMultiMetricsQuery(queries map[string]string, quantization
103
103
func (c * Client ) parseMetricsQueryResponse (response []byte ) (* MetricsQueryResponse , error ) {
104
104
var metricsResponse MetricsQueryResponse
105
105
if err := json .Unmarshal (response , & metricsResponse ); err != nil {
106
- return nil , fmt .Errorf ("failed to unmarshal metrics query response: %v " , err )
106
+ return nil , fmt .Errorf ("failed to unmarshal metrics query response: %w " , err )
107
107
}
108
108
109
109
if metricsResponse .Errors != nil && len (metricsResponse .Errors .Errors ) > 0 {
0 commit comments