Added security check for Weather API for 510 error