Use fmt.Errorf instead
This commit is contained in:
1 parent
0769f33653
commit
0612dc6f89
1 file changed
+1
-1
@@ -213,7 +213,7 @@ func fetchCustomAPIRequest(ctx context.Context, req *CustomAPIRequest) (*customA
|
||||
return nil, errors.New("invalid response JSON")
|
||||
}
|
||||
|
||||
return nil, errors.New(fmt.Sprintf("%d %s", resp.StatusCode, http.StatusText(resp.StatusCode)))
|
||||
return nil, fmt.Errorf("%d %s", resp.StatusCode, http.StatusText(resp.StatusCode))
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user