How can I trap an error that is generated by a timeout when the server is taking to long?