Chore: Enable errorlint linter (#29227)
* Enable errorlint linter * Handle wrapped errors Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
co-authored by
Emil Tullstedt
parent
993adb72e0
commit
9593d57914
@@ -2,6 +2,7 @@ package rendering
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@@ -45,7 +46,7 @@ func (rs *RenderingService) renderViaPluginV1(ctx context.Context, renderKey str
|
||||
rs.log.Debug("calling renderer plugin", "req", req)
|
||||
|
||||
rsp, err := rs.pluginInfo.GrpcPluginV1.Render(ctx, req)
|
||||
if ctx.Err() == context.DeadlineExceeded {
|
||||
if errors.Is(ctx.Err(), context.DeadlineExceeded) {
|
||||
rs.log.Info("Rendering timed out")
|
||||
return nil, ErrTimeout
|
||||
}
|
||||
@@ -88,7 +89,7 @@ func (rs *RenderingService) renderViaPluginV2(ctx context.Context, renderKey str
|
||||
rs.log.Debug("Calling renderer plugin", "req", req)
|
||||
|
||||
rsp, err := rs.pluginInfo.GrpcPluginV2.Render(ctx, req)
|
||||
if ctx.Err() == context.DeadlineExceeded {
|
||||
if errors.Is(ctx.Err(), context.DeadlineExceeded) {
|
||||
rs.log.Info("Rendering timed out")
|
||||
return nil, ErrTimeout
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user