Cleaned up server error handling