Chore: Add errutils helpers (#73577)

Add helpers for the errutil package in favor of errutil.NewBase.
This commit is contained in:
Marcus Efraimsson
2023-08-22 12:52:24 +02:00
committed by GitHub
parent 1cc226e689
commit 040b7d2571
45 changed files with 261 additions and 161 deletions

View File

@@ -55,7 +55,7 @@ func TestErrors(t *testing.T) {
{
name: "grafana error with fallback to other error",
err: errutil.NewBase(errutil.StatusTimeout, "thing.timeout").Errorf("whoops"),
err: errutil.Timeout("thing.timeout").Errorf("whoops"),
statusCode: http.StatusBadRequest,
message: genericErrorMessage,