Anvil extras routing problems?

Hey everyone,

I’m getting the following warning on my site. I’ve implemented hash routing and it still works fine, but this hasn’t ever popped up.

#routing: Deprecated: it is now possible to catch a SessionExpiredError in the anvil.set_default_error_handler() callback

Was there a recent change anvil_extras? I can’t find any information on recent changes.

Yes, They just updated it to 2.0:

1 Like

@ianb I don’t know how I missed that thread, but I appreciated the reply! Thank you!

1 Like

I should improve that warning.
It’s the on_session_expired() call.

I’ve kept that function around but added a deprecation warning. The original reason for it was to make sure that the same url hash is loaded on session expired.

That recently became the default behaviour for anvils’s default session expired modal :slightly_smiling_face:.

Another reason was that it previously wasn’t possible to catch a SessionExpiredError in a custom default error handler. But that was also fixed.

Both these internal changes make using the hash routing version unnecessary. In fact, the default functionality is the same as not using it.

2 Likes