diff --git a/network/datex-http-channel.ts b/network/datex-http-channel.ts index 4e1159bf..84a7cbab 100644 --- a/network/datex-http-channel.ts +++ b/network/datex-http-channel.ts @@ -14,8 +14,8 @@ export function sendDatexViaHTTPChannel(dxb: ArrayBuffer, origin = window.locati } else { fetch(origin + "/datex-http", { - method:'post', - headers:{ + method: 'post', + headers: { 'Content-Type': 'application/datex', }, body: dxb, diff --git a/utils/error-reporting.ts b/utils/error-reporting.ts index 72247441..45559f97 100644 --- a/utils/error-reporting.ts +++ b/utils/error-reporting.ts @@ -4,13 +4,13 @@ import { Runtime } from "../runtime/runtime.ts"; import { getCallerInfo } from "../utils/caller_metadata.ts"; import { logger } from "./global_values.ts"; -export async function sendReport(id: string, reportData:Record) { +export async function sendReport(identifier: string, reportData:Record) { if (!enabled) return; const report = { - id, + identifier, timestamp: new Date(), - metaData: { + metadata: { datexcoreVersion: Runtime.VERSION, uixVersion: globalThis.UIX?.version, denoVersion: globalThis.Deno?.version.deno, @@ -22,7 +22,7 @@ export async function sendReport(id: string, reportData:Record) { stack: getCallerInfo() } - const dx = `@+unyt_status.Reporting.sendReport(?)` + const dx = `#endpoint.Reporting.sendReport(?)` const dxb = await Compiler.compile(dx, [report], {sign: false, encrypt: false}); sendDatexViaHTTPChannel(dxb, "https://status.unyt.org") }