* `GET /v3/users/me`. Throws `ErrUnauthenticated` on 401, `ErrApi` * on any other non-2xx or non-JSON body. * * On OAuth 401 with a refresh hook configured, the request is * retried once after refreshing the access token. The retry's * outcome is what the caller sees — if the refresh
(credential: ResolvedCredential)
| 111 | * "please log in again" path upstream. |
| 112 | */ |
| 113 | async getCurrentUser(credential: ResolvedCredential): Promise<UserInfo> { |
| 114 | const url = `${this.base}/v3/users/me`; |
| 115 | return await this.fetchUser(url, credential, true); |
| 116 | } |
| 117 | |
| 118 | // fallow-ignore-next-line complexity |
| 119 | private async fetchUser( |
no test coverage detected