Skip to content

Commit cfe9c41

Browse files
chore: remove unnecessary error check for url parsing
1 parent cbb2c75 commit cfe9c41

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/requestconfig/requestconfig.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ func NewRequestConfig(ctx context.Context, method string, u string, body any, ds
122122
}
123123
params := q.Encode()
124124
if params != "" {
125-
parsed, err := url.Parse(u)
126-
if err != nil {
127-
return nil, err
128-
}
125+
parsed, _ := url.Parse(u)
129126
if parsed.RawQuery != "" {
130127
parsed.RawQuery = parsed.RawQuery + "&" + params
131128
u = parsed.String()

0 commit comments

Comments
 (0)