Dash handling of ERR_EMPTY_RESPONSE during load

I get the following error in production on first load - sometimes on refresh, but not always. I’m guessing the issue is in the API call and the restructuring of all the data - it takes a while to parse out and move through the file to the layout. It’ll sit here reloading for maybe 30 seconds or so. eventually, the layout catches up with itself and loads naturally.

But, when I inspect the browser console, I see this:
image

I been experimenting with the loading states, but the call back input is lost on me in this scenario. Ideally, I’d like to have one of two scenarios:

  1. Its blank on load
  2. Some sort of spinner indicating its coming

Is this possible if the script has sent any data yet?