Exception and error management in s2verify gateway and listener