use errors.New when not formatting

This commit is contained in:
Joel Wetzell
2025-12-23 15:00:30 -06:00
parent 76583b1fb8
commit ff1949ce69
49 changed files with 245 additions and 229 deletions

View File

@@ -2,7 +2,7 @@ package processor
import (
"context"
"fmt"
"errors"
"io"
"net/http"
@@ -17,7 +17,7 @@ func (hre *HTTPRequestEncode) Process(ctx context.Context, payload any) (any, er
payloadRequest, ok := payload.(*http.Request)
if !ok {
return nil, fmt.Errorf("http.request.encode processor only accepts an http.Request")
return nil, errors.New("http.request.encode processor only accepts an http.Request")
}
bytes, err := io.ReadAll(payloadRequest.Body)