Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ protected void uploadQueuedCalls(ProgressFeedback feedback) throws SyncException
call.getIdempotency_key()
);
if (response.getResponse().code() < 500) {
if (response.getResponse().code() >= 400) {
if (response.getResponse().code() >= 400 && response.getResponse().code() != 404) {
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());
Expand All @@ -550,7 +550,7 @@ protected void uploadQueuedCalls(ProgressFeedback feedback) throws SyncException
sentry.captureException(e);
throw new SyncException("Unknown server response: " + e.getMessage());
} catch (NotFoundApiException e) {
if (url.contains("/failed_checkins/") || url.contains("/printlog/")) {
if (url.contains("/failed_checkins/") || url.contains("/printlog/") || url.contains("/posprintlog/")) {
// ignore this one: old pretix systems don't have it
db.getQueuedCallQueries().delete(call.getId());
} else {
Expand All @@ -562,11 +562,12 @@ protected void uploadQueuedCalls(ProgressFeedback feedback) throws SyncException
if (e instanceof DeviceAccessRevokedException // 401
|| e instanceof UnauthorizedApiException // 401
|| e instanceof PermissionDeniedApiException // 403
|| e instanceof NotFoundApiException // 404
|| e instanceof FinalApiException // >= 405
|| e instanceof ConflictApiException // 409
) {
db.getQueuedCallQueries().updateIdempotencyKey(NonceGenerator.nextNonce(), call.getId());
} else if (e instanceof NotFoundApiException) { // 404
db.getQueuedCallQueries().delete(call.getId());
}
throw new SyncException(e.getMessage());
}
Expand Down
Loading