(
outcome: 'success' | 'failure',
reason?: MCPRefreshFailureReason,
)
| 2181 | |
| 2182 | const mcpServerBaseUrl = getLoggingSafeMcpBaseUrl(this.serverConfig) |
| 2183 | const emitRefreshEvent = ( |
| 2184 | outcome: 'success' | 'failure', |
| 2185 | reason?: MCPRefreshFailureReason, |
| 2186 | ): void => { |
| 2187 | logEvent( |
| 2188 | outcome === 'success' |
| 2189 | ? 'tengu_mcp_oauth_refresh_success' |
| 2190 | : 'tengu_mcp_oauth_refresh_failure', |
| 2191 | { |
| 2192 | transportType: this.serverConfig |
| 2193 | .type as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 2194 | ...(mcpServerBaseUrl |
| 2195 | ? { |
| 2196 | mcpServerBaseUrl: |
| 2197 | mcpServerBaseUrl as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 2198 | } |
| 2199 | : {}), |
| 2200 | ...(reason |
| 2201 | ? { |
| 2202 | reason: |
| 2203 | reason as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 2204 | } |
| 2205 | : {}), |
| 2206 | }, |
| 2207 | ) |
| 2208 | } |
| 2209 | |
| 2210 | for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) { |
| 2211 | try { |
nothing calls this directly
no test coverage detected