How get a toast to show when calling from dynamic event

Morning

I have setup a toast to show when I get an error response from the server but for some reason it is not showing up when the error event fires. I added a button to manually test if the toast works and it does.

My settings look as follows:

Any ideas?

I changed it unauthorised 401 instead of error and it all works now. Strange when returning a 500 and trying to catch it the toast doesn’t show.

Hello, entering wrong user details trigger an unauthorized error.
So you should use the Unauthorized dynamic events to run actions, based on such errors.