Throw exception if environment not configured