Remove github.com/pkg/errors with appropriate replacements (#3172)
* errors.Wrap* removal Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * remove errors.Errorf Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Remove remaining calls Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Few more errors Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Fix golint errors Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -4,12 +4,12 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
@@ -104,7 +104,7 @@ func sendRequest(logger *zap.Logger, ctx context.Context, httpClient *http.Clien
|
||||
// skip retry and return directly due to context deadline exceeded
|
||||
if err == context.DeadlineExceeded {
|
||||
msg := "error specializing function pod, either increase the specialization timeout for function or check function pod log would help."
|
||||
err = errors.Wrap(err, msg)
|
||||
err = fmt.Errorf("%s: %w", msg, err)
|
||||
logger.Error(msg, zap.Error(err), zap.String("url", url))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user