Rendering: Check timeout error when the request failed (#57654)

* Check timeout error when the request failed

* Update error and check

* Uses errors.As to fix the lint
This commit is contained in:
Selene
2022-10-27 17:27:03 +02:00
committed by GitHub
parent 2a36301817
commit bff9671b81
2 changed files with 11 additions and 3 deletions
+2
View File
@@ -7,11 +7,13 @@ import (
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/util/errutil"
)
var ErrTimeout = errors.New("timeout error - you can set timeout in seconds with &timeout url parameter")
var ErrConcurrentLimitReached = errors.New("rendering concurrent limit reached")
var ErrRenderUnavailable = errors.New("rendering plugin not available")
var ErrServerTimeout = errutil.NewBase(errutil.StatusUnknown, "rendering.serverTimeout", errutil.WithPublicMessage("error trying to connect to image-renderer service"))
type RenderType string