I noticed that you made the lasttimeerror to be nil if you get the correct location at the end, but not the other way around.
Will there be a case that, you get the correct location at first, and then you encounter an error. If that is the case, the location still stores the value last time we put in. Then “if let location = location” in updatelabel will still be true, and we won’t even get to the part where the error gets handled in updateLabel().