How do you collect the information regarding the page route and the API it uses in a Vue project?

We have a Vue project that has over 1,000 pages, and all the pages are using a centralized axios-based request module to send requests to BE. In order to know which page uses what APIs, we use axios interceptor to collect the APIs a particular pages uses, that get the current route path the the API about to goes out.

However, we soon find problems, that the mappings we collect is not correct when the API is being handled async, for a simple example, if you have a request in setTimeout, it will mess it up that the routes has changed before the API was actually sent. And it would collect a wrong mapping.

We were trying very hard to find a solution that can actually solve this problem without making massive changes.

I understand the best way of solving this was to leverage the JS closure that fixing the route info for each page component and pass it to the request as a param. Or a request factory method for all pages. But this almost need us to do changes everywhere.

So with these I do need suggestions on an elegant way to solve this with minimum changes. How did your organization do similar things?