check locale when handling http error