error handling of temperature