mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-04 01:58:31 +00:00
Treat any 200 code as success
This commit is contained in:
parent
0da257197f
commit
e04b6c84f8
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ func (backend *backendInfo) SendRemoteCommand(remoteCommand, data string, auth A
|
||||||
|
|
||||||
if resp.StatusCode == 401 {
|
if resp.StatusCode == 401 {
|
||||||
return "", ErrAuthorizationNeeded
|
return "", ErrAuthorizationNeeded
|
||||||
} else if resp.StatusCode != 200 {
|
} else if resp.StatusCode < 200 || resp.StatusCode > 299 { // any non-2xx
|
||||||
if resp.Header.Get("Content-Type") == "application/json" {
|
if resp.Header.Get("Content-Type") == "application/json" {
|
||||||
var err2 ErrForwardedFromBackend
|
var err2 ErrForwardedFromBackend
|
||||||
err := json.Unmarshal(respBytes, &err2.JSONError)
|
err := json.Unmarshal(respBytes, &err2.JSONError)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue