chore(acc): automate token logs
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user