Skip to content

Commit

Permalink
chore: Get timeoutException on graphql Request
Browse files Browse the repository at this point in the history
  • Loading branch information
redDwarf03 committed Jan 6, 2025
1 parent c5bf802 commit 9146362
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/services/api_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,12 @@ class ApiService with JsonRPCUtil {
final exception = result.exception?.linkException;
if (exception == null) return;

if (exception is UnknownException) {
if (exception.originalException is TimeoutException) {
throw TimeoutException(exception.message);
}
}

if (exception is HttpLinkParserException) {
if (exception.response.statusCode == 429) {
throw const ArchethicTooManyRequestsException();
Expand Down

0 comments on commit 9146362

Please sign in to comment.