Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: When syncing the history, deleted products/products not found should be skipped #4554

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -286,8 +286,10 @@ class ProductRepository @Inject constructor(
getUserAgent(Utils.HEADER_USER_AGENT_SEARCH)
)

if (state.status == 0L) throw IOException("Could not sync history. Error with product ${state.code} ")
else {
// Products not found should be skipped
if (state.status == 0L && state.statusVerbose?.contains("not found") != true) {
throw IOException("Could not sync history. Error with product ${state.code} ")
} else if (state.status > 0L) {
val product = state.product!!
val hp = HistoryProduct(
product.productName,
Expand Down