handle production env and error views