Hi Martin,
If you don't want the URL to change, I imagine that you could show a dialog with the error message, especially if it makes sense for users to continue to use the page after the error. If not, you could have a the content of your page in a "big" xf:switch / xf:case around the "whole page", and add a xf:case you toggle to in case of error.
Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet