1
0
Fork 0
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:
Kane York 2017-08-24 11:54:56 -07:00
parent 0da257197f
commit e04b6c84f8

View file

@ -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)