axios+telemetry cleanup
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
import { feature } from 'bun:bundle'
|
||||
import axios from 'axios'
|
||||
import { isHttpError, nativeRequest } from '../utils/http.js'
|
||||
import {
|
||||
createV2ReplTransport,
|
||||
type ReplBridgeTransport,
|
||||
@@ -981,17 +981,17 @@ async function archiveSession(
|
||||
// cse_* and we correctly send it.
|
||||
const compatId = toCompatSessionId(sessionId)
|
||||
try {
|
||||
const response = await axios.post(
|
||||
const response = await nativeRequest(
|
||||
`${baseUrl}/v1/sessions/${compatId}/archive`,
|
||||
{},
|
||||
{
|
||||
method: 'POST',
|
||||
body: {},
|
||||
headers: {
|
||||
...oauthHeaders(accessToken),
|
||||
'anthropic-beta': 'ccr-byoc-2025-07-29',
|
||||
'x-organization-uuid': orgUUID,
|
||||
},
|
||||
timeout: timeoutMs,
|
||||
validateStatus: () => true,
|
||||
},
|
||||
)
|
||||
logForDebugging(
|
||||
@@ -1001,7 +1001,7 @@ async function archiveSession(
|
||||
} catch (err) {
|
||||
const msg = errorMessage(err)
|
||||
logForDebugging(`[remote-bridge] Archive failed: ${msg}`)
|
||||
return axios.isAxiosError(err) && err.code === 'ECONNABORTED'
|
||||
return isHttpError(err) && err.code === 'ECONNABORTED'
|
||||
? 'timeout'
|
||||
: 'error'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user