Trial treating 403 Forbidden as too many requests

This commit is contained in:
fullwall 2024-11-10 07:51:12 +08:00
parent 695baf4481
commit 817df76468

View File

@ -248,8 +248,8 @@ class ProfileFetchThread implements Runnable {
String message = e.getMessage(); String message = e.getMessage();
String cause = e.getCause() != null ? e.getCause().getMessage() : null; String cause = e.getCause() != null ? e.getCause().getMessage() : null;
return message != null && message.contains("too many requests") return message != null && (message.contains("403 Forbidden") || message.contains("too many requests"))
|| cause != null && cause.contains("too many requests"); || cause != null && (cause.contains("403 Forbidden") || cause.contains("too many requests"));
} }
private static void sendResult(ProfileFetchHandler handler, ProfileRequest request) { private static void sendResult(ProfileFetchHandler handler, ProfileRequest request) {