File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory
11
11
import io .circe .generic .extras
12
12
import io .circe .generic .extras .auto ._
13
13
import io .circe .syntax .EncoderOps
14
+ import org .http4s .client .UnexpectedStatus
14
15
15
16
trait PlexUtils {
16
17
@@ -23,13 +24,16 @@ trait PlexUtils {
23
24
val jsonFormatUrl = url.withQueryParam(" format" , " json" )
24
25
25
26
client.httpRequest(Method .GET , jsonFormatUrl).map {
27
+ case Left (UnexpectedStatus (s, _, _)) if s.code == 500 =>
28
+ logger.debug(s " Unable to fetch watchlist from Plex, see https://github.com/nylonee/watchlistarr/issues/161 " )
29
+ Set .empty
26
30
case Left (err) =>
27
31
logger.warn(s " Unable to fetch watchlist from Plex: $err" )
28
32
Set .empty
29
33
case Right (json) =>
30
34
logger.debug(" Found Json from Plex watchlist, attempting to decode" )
31
35
json.as[Watchlist ].map(_.items).getOrElse {
32
- logger.warn(" Unable to fetch watchlist from Plex - decoding failure. Returning empty list instead " )
36
+ logger.warn(" Unable to fetch watchlist from Plex - decoding failure" )
33
37
Set .empty
34
38
}
35
39
}
You can’t perform that action at this time.
0 commit comments