Skip to content

fix miscellaneous issues which could cause unexpected behavior/errors#86

Merged
patrickdemers6 merged 1 commit intomainfrom
misc-issues
Sep 10, 2023
Merged

fix miscellaneous issues which could cause unexpected behavior/errors#86
patrickdemers6 merged 1 commit intomainfrom
misc-issues

Conversation

@patrickdemers6
Copy link
Copy Markdown
Owner

  • Default backend host environment variable for expo builds
  • Only add eventListener for dimensions on initial render, not every rerender.
  • Do not try reconnecting to websocket if websocket doesn't exist
  • Retry grabbing data on unexpected status code.

return dataResponse.json();
}

throw new Error('something went wrong');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To double check, looks like retrying was already implemented beforehand, just errors wouldn't be caught if the request fell through the conditionals?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Yep if there was success status code but something unexpected, it is possible the app would stay loading forever. No reason to think this is happening, but came across and figured that isn't how we would want it to behave.

Copy link
Copy Markdown

@Nick-Vazquez Nick-Vazquez left a comment

Choose a reason for hiding this comment

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

Looks good, just had the single question about the catch statement.

@patrickdemers6 patrickdemers6 merged commit e1b0f2f into main Sep 10, 2023
@patrickdemers6 patrickdemers6 deleted the misc-issues branch September 10, 2023 22:10
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