axios+telemetry cleanup

This commit is contained in:
2026-04-02 15:19:11 +03:00
parent a3cbca1e11
commit 7e1eac8002
100 changed files with 3048 additions and 4491 deletions

View File

@@ -7,7 +7,7 @@
* accessToken + baseUrl — no implicit auth or config reads.
*/
import axios from 'axios'
import { isHttpError, nativeRequest } from '../utils/http.js'
import { logForDebugging } from '../utils/debug.js'
import { errorMessage } from '../utils/errors.js'
import { jsonStringify } from '../utils/slowOperations.js'
@@ -33,16 +33,13 @@ export async function createCodeSession(
const url = `${baseUrl}/v1/code/sessions`
let response
try {
response = await axios.post(
response = await nativeRequest(
url,
// bridge: {} is the positive signal for the oneof runner — omitting it
// (or sending environment_id: "") now 400s. BridgeRunner is an empty
// message today; it's a placeholder for future bridge-specific options.
{ title, bridge: {}, ...(tags?.length ? { tags } : {}) },
{
method: 'POST',
body: { title, bridge: {}, ...(tags?.length ? { tags } : {}) },
headers: oauthHeaders(accessToken),
timeout: timeoutMs,
validateStatus: s => s < 500,
},
)
} catch (err: unknown) {
@@ -104,13 +101,13 @@ export async function fetchRemoteCredentials(
}
let response
try {
response = await axios.post(
response = await nativeRequest(
url,
{},
{
method: 'POST',
body: {},
headers,
timeout: timeoutMs,
validateStatus: s => s < 500,
},
)
} catch (err: unknown) {