Adding custom ErrorHandler to return (fatal) errors as rich XML/JSON