Database authorization error on page refresh

I’m having difficulty with my website. For background, I have an external database on google cloud connected to my website, displayed as elements on a webpage. When I navigate to these pages via my menu bar, it loads without issue.

However, if I try to refresh the same page or directly navigate to the url in my browser I get an Error 500. Looking at the webpage logs it looks like the exact error is “You are not authorized” WDE0116.

I’m just curious why there is any difference between a refresh and navigation via the menu bar. Any thoughts?

Do you know the answer now?