Fix app crashes when RedditError is not available when loading posts fails in PostPagingSource.

This commit is contained in:
Docile-Alligator
2026-07-28 15:22:20 -04:00
parent 2e715e9cbc
commit 10a07a44d4

View File

@ -273,7 +273,7 @@ public class PostPagingSource extends ListenableFuturePagingSource<String, Post>
RedditError redditError = new Gson().fromJson(errorBody.string(), RedditError.class);
return new LoadResult.Error<>(new PostPagingSourceError(response.code(), redditError.getReason()));
}
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
}
return new LoadResult.Error<>(new PostPagingSourceError(response.code(), null));