axios+telemetry cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user