diff --git a/targets/emby/api.go b/targets/emby/api.go index e8ec1ea7..c75ed192 100644 --- a/targets/emby/api.go +++ b/targets/emby/api.go @@ -50,7 +50,7 @@ func (c apiClient) do(req *http.Request) (*http.Response, error) { switch res.StatusCode { case 401: return nil, fmt.Errorf("invalid emby token: %s: %w", res.Status, autoscan.ErrFatal) - case 404, 500, 503, 504: + case 404, 500, 502, 503, 504: return nil, fmt.Errorf("%s: %w", res.Status, autoscan.ErrTargetUnavailable) default: return nil, fmt.Errorf("%s: %w", res.Status, autoscan.ErrFatal) diff --git a/targets/plex/api.go b/targets/plex/api.go index a3b193e6..59a56ea0 100644 --- a/targets/plex/api.go +++ b/targets/plex/api.go @@ -51,7 +51,7 @@ func (c apiClient) do(req *http.Request) (*http.Response, error) { switch res.StatusCode { case 401: return nil, fmt.Errorf("invalid plex token: %s: %w", res.Status, autoscan.ErrFatal) - case 404, 500, 503, 504: + case 404, 500, 502, 503, 504: return nil, fmt.Errorf("%s: %w", res.Status, autoscan.ErrTargetUnavailable) default: return nil, fmt.Errorf("%s: %w", res.Status, autoscan.ErrFatal)