mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
parent
b980b5530d
commit
1ae8624e05
10 changed files with 15 additions and 24 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"strconv"
|
||||
|
@ -186,7 +185,7 @@ func (c *rpcClient) doCall(ctx context.Context, request RPCRequest) (*RPCRespons
|
|||
|
||||
if err != nil {
|
||||
if httpResponse.StatusCode >= 400 {
|
||||
return nil, errors.Wrap(err, fmt.Sprintf("rpc call %v() on %v status code: %v. Could not decode body to rpc response", request.Method, httpRequest.URL.String(), httpResponse.StatusCode))
|
||||
return nil, errors.Wrap(err, "rpc call %v() on %v status code: %v. Could not decode body to rpc response", request.Method, httpRequest.URL.String(), httpResponse.StatusCode)
|
||||
}
|
||||
// if res.StatusCode == http.StatusUnauthorized {
|
||||
// return nil, errors.New("unauthorized: bad credentials")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue