Added general error handling around ses testing