so I was trying to see how to handle the possibility of my server being down for whatever reason, and I keep getting HTTPLinkServerException without being able to handle it with a try/catch block. After seing the answer here try catch on HttpLinkServerException doesn't catch error I also wrote my own error parser, but still doesn't work, since the exception is being thrown because of the HTTP status code. Any thoughts?
Is there something I'm missing on how to catch errors from async* functions? (I'm sort of new to flutter/dart)
The part of my code that triggers the error is this:
try {
final result = graphQLClient.mutate(
MutationOptions(
document: gql(myMutation),
variables: <String, String>{
"var": val,
},
)
);
} catch(err) {
print(err);
}
Thanks!