Skip to content

Commit

Permalink
fix(http): don't fail silently on paging error
Browse files Browse the repository at this point in the history
  • Loading branch information
outadoc committed Oct 4, 2024
1 parent 2daf562 commit d214122
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ internal class TwitchApiImpl(
logError<TwitchApiImpl>(exception) {
"getFollowedStreams: failed to load more items"
}
// TODO fail everything if one request fails

throw exception
}
.onSuccess { response ->
logDebug<TwitchApiImpl> {
Expand Down Expand Up @@ -235,6 +236,8 @@ internal class TwitchApiImpl(
logError<TwitchApiImpl>(exception) {
"getFollowedChannels: failed to load more items"
}

throw exception
}
.onSuccess { response ->
logDebug<TwitchApiImpl> {
Expand Down Expand Up @@ -350,6 +353,8 @@ internal class TwitchApiImpl(
logError<TwitchApiImpl>(exception) {
"getChannelVideos: failed to load more items"
}

throw exception
}
.onSuccess { response ->
logDebug<TwitchApiImpl> {
Expand Down Expand Up @@ -406,6 +411,8 @@ internal class TwitchApiImpl(
logError<TwitchApiImpl>(exception) {
"getChannelSchedule: failed to load more items"
}

throw exception
}
.onSuccess { response ->
val segments = response.data.segments.orEmpty()
Expand Down

0 comments on commit d214122

Please sign in to comment.