Skip to content

Commit f01164d

Browse files
committed
Match the error for missing parent product
1 parent 8136676 commit f01164d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/Sources/Yosemite/PointOfSale/Items/PointOfSaleLocalBarcodeScanService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public final class PointOfSaleLocalBarcodeScanService: PointOfSaleBarcodeScanSer
5555
}
5656
// Fetch parent product using the relationship
5757
guard let parentProduct = try variation.request(for: PersistedProductVariation.parentProduct).fetchOne(db) else {
58-
return nil
58+
throw PointOfSaleBarcodeScanError.noParentProductForVariation(scannedCode: globalUniqueID)
5959
}
6060
return (variation, parentProduct)
6161
}

0 commit comments

Comments
 (0)