Currently, if you look e.g. at this issue: https://sentry.sentry.io/replays/04147ee7b3684015a60d6d951f4a4303/?project=11276&query=&referrer=%2Freplays%2F&statsPeriod=7d&t_main=errors&yAxis=count%28%29 you can see that the error gets the replay_id added even though the session is for sure expired. We should check in the error handler if the session is expired before attaching the replay_id.