Skip to content

Throw exception if network is not working - #19

Open
MaurizioK wants to merge 2 commits into
masterfrom
console/NetworkState
Open

Throw exception if network is not working#19
MaurizioK wants to merge 2 commits into
masterfrom
console/NetworkState

Conversation

@MaurizioK

@MaurizioK MaurizioK commented May 29, 2024

Copy link
Copy Markdown

@MaurizioK
MaurizioK requested a review from a team May 29, 2024 16:17
@MaurizioK
MaurizioK marked this pull request as ready for review June 25, 2024 12:28
if (webRequest.result == UnityWebRequest.Result.ConnectionError)
{
Debug.LogError("Error While Sending: " + webRequest.error);
throw new UnityWebRequestException(webRequest);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this make the console to crash?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At line 177 there is the same thing (already there since the dawn of time).

If the flow I've found is the only one possible, then this exception is catched by our GraphQL utility, the good ol' Query_Internal method. Since it's a managed exception it shouldn't make the console crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants