Skip to content

chore: use x-actor-request-id to charge - #138

Merged
ruocco-l merged 5 commits into
masterfrom
chore/change-charge-payload
Aug 19, 2026
Merged

chore: use x-actor-request-id to charge#138
ruocco-l merged 5 commits into
masterfrom
chore/change-charge-payload

Conversation

@ruocco-l

@ruocco-l ruocco-l commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Just changing the header we use on charging to be up to specs and its related function/variable names.

We had to move around the sendResponseIfFinished because we want to charge before sending the request.

@ruocco-l
ruocco-l marked this pull request as draft August 17, 2026 10:15
@ruocco-l
ruocco-l marked this pull request as ready for review August 18, 2026 09:37

@nikitachapovskii-dev nikitachapovskii-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explanation! Please fix lint alert Error: 10:45 error 'sendResponseIfFinished' is defined but never used @typescript-eslint/no-unused-vars
and the point below:

Comment thread src/crawlers.ts
Comment on lines 292 to 300
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
'Idempotency-Key': randomId(),
},
body: JSON.stringify({ eventName, count: 1, userAuthorization }),
body: JSON.stringify({ eventName, count: 1, requestId: actorRequestId }),
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in slack we would better add timeout here

@nikitachapovskii-dev nikitachapovskii-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections!
I think the fix for media can be done in a separate pr if we want to fix it 👍

@ruocco-l
ruocco-l merged commit fcc71b8 into master Aug 19, 2026
2 checks passed
@ruocco-l
ruocco-l deleted the chore/change-charge-payload branch August 19, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants