Catch errors in the servlet response