Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine duplicate implementations of toInstrumentedOdspTokenFetcher #9248

Closed
Tracked by #7347
markfields opened this issue Feb 26, 2022 · 1 comment · Fixed by #9375
Closed
Tracked by #7347

Combine duplicate implementations of toInstrumentedOdspTokenFetcher #9248

markfields opened this issue Feb 26, 2022 · 1 comment · Fixed by #9375

Comments

@markfields
Copy link
Member

One is toInstrumentedOdspTokenFetcher in odspUtils.ts (used by document service factory), and the other is toInstrumentedTokenFetcher in odspDriverUrlResolverForShareLink.ts (used by url resolver).

I don't think we would need two implementations. And it tripped me up, because I was expecting the behavior of one when looking at the logs, but it was going through the other which doesn't behave the same way.

@markfields
Copy link
Member Author

In particular, the url resolver one doesn't wrap thrown errors with fetchTokenError errorType, so it is basically impossible to aggregate them together in telemetry, which is a big miss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment