Submitting the form below should trigger a cast error in the XQuery script on the server side (it expects a number). You should be redirected to the error handler page.
View source: this page, demo.xql.