catch exception for server error