Skip to content

Commit bf8fc6c

Browse files
authored
fix: POST snapshots to the right endpoint (#271)
In in the config refactor we're accidentally POST'ing to the health check endpoint, which 404s Will add tests in a follow up PR
1 parent fff73ef commit bf8fc6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/sdk-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Axios from 'axios'
22
import * as path from 'path'
3-
import {DEFAULT_PORT, HEALTHCHECK_PATH} from '../services/agent-service-constants'
3+
import {DEFAULT_PORT, HEALTHCHECK_PATH, SNAPSHOT_PATH} from '../services/agent-service-constants'
44
import {logError} from './logger'
55

66
export function agentJsFilename() {
@@ -23,7 +23,7 @@ export async function isAgentRunning() {
2323
}
2424

2525
export async function postSnapshot(body: any) {
26-
const URL = `http://localhost:${DEFAULT_PORT}${HEALTHCHECK_PATH}`
26+
const URL = `http://localhost:${DEFAULT_PORT}${SNAPSHOT_PATH}`
2727
const ONE_HUNDRED_MB_IN_BYTES = 100_000_000
2828

2929
return Axios({

0 commit comments

Comments
 (0)