chore(acc): automate token logs

This commit is contained in:
Chuck Driesler
2025-07-23 17:50:45 +01:00
parent 9446e422cd
commit fa4e4ea3bd
3 changed files with 5 additions and 2 deletions
+2
View File
@@ -287,6 +287,8 @@ const schedulePendingAccSyncItemsPoll = () => {
syncItem.automationId
)
console.log({ automationToken })
if (!automationToken) continue
await triggerAutomationRun({
@@ -103,12 +103,12 @@ const invokeSafeJsonRequestFactory =
const invokeJsonRequest = async <R = Record<string, unknown>>(
...args: Parameters<typeof invokeRequest>
) => {
const [{ url, method = 'get', body }] = args
const [{ url, method = 'get', body, token }] = args
const response = await invokeRequest(...args)
const result = (await response.json()) as R
if (isErrorResponse(result)) {
throw new ExecutionEngineFailedResponseError(result, { method, url, body })
throw new ExecutionEngineFailedResponseError(result, { method, url, body, token })
}
return result
@@ -16,6 +16,7 @@ export type ExecutionEngineErrorRequest = {
method: string
url: string
body?: Record<string, unknown>
token?: string
}
export class ExecutionEngineFailedResponseError extends BaseError {