error handling for ping endpoint