Skip to content

Rotate idempotency key when we've gotten a 40x error on upload - #102

Merged
robbi5 merged 3 commits into
masterfrom
rotate-idempotency-key-40x
Oct 12, 2026
Merged

robbi5 merged 3 commits into
masterfrom
rotate-idempotency-key-40x

Conversation

@robbi5

@robbi5 robbi5 commented Oct 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@robbi5 robbi5 changed the title Rotate idempotency key when gotten a 40x error on upload Rotate idempotency key when we've gotten a 40x error on upload Oct 8, 2026
if (response.getResponse().code() >= 400) {
sentry.captureException(new ApiException("Received response (" + response.getResponse().code() + ") for queued call: " + response.getData().toString()));
// We ignore 400s, because we can't do something about them
db.getQueuedCallQueries().updateIdempotencyKey(NonceGenerator.nextNonce(), call.getId());

@robbi5 robbi5 Oct 8, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not really sure about that one. postResource should throw some Exception, so that whole if shouldn't really be executed.

@robbi5
robbi5 force-pushed the rotate-idempotency-key-40x branch from e20fc7d to 7afc9ec Compare October 9, 2026 08:24
@robbi5
robbi5 marked this pull request as ready for review October 9, 2026 08:25
@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.36%. Comparing base (f80f951) to head (7afc9ec).
⚠️ Report is 23 commits behind head on master.

Files with missing lines Patch % Lines
...java/eu/pretix/libpretixsync/sync/SyncManager.java 0.00% 20 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #102      +/-   ##
============================================
+ Coverage     30.09%   32.36%   +2.27%     
- Complexity      548      584      +36     
============================================
  Files           145      147       +2     
  Lines          7507     8176     +669     
  Branches       1035     1112      +77     
============================================
+ Hits           2259     2646     +387     
- Misses         4948     5213     +265     
- Partials        300      317      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pc-coholic

Copy link
Copy Markdown
Member

Tested by removing ('POST', 'api-v1:order-list'), permission and adding it again later.

@robbi5
robbi5 merged commit b9affac into master Oct 12, 2026
2 of 3 checks passed
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.

2 participants