Handle server errors gracefully.