Catch Server errors and handle gracefully