Issue while creating a price filter

Can someone pls help. I’m creating an online store.
I’m creating a product gallery by adding a repeater and connecting that to the stores/products dataset. I’m running into an error while building a price filter (by using user input from users from a slider element). Here’s the code I’ve written:

export function priceSlider_change2(event) {
//Add your code for this event here:
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}

debounceTimer = setTimeout(() => {
// COde to filter the Dataset
$w(“#productsDataset”).setFilter( wixData.filter()
.le(“discountedPrice”, $w(“#priceSlider”).value)
)
.then( () => {
console.log(“Dataset is now filtered”);
} )
. catch ( (err) => {
console.log(err);
} );

}, 500);

console.log($w(“#priceSlider”).value);

}

Here’s the error I’m getting:

[wix-dataset.setFilter] called with ( [{“filterTree”:{“$and”:[{“discountedPrice”:{“$lte”:300}}]},“invalidArguments”:}] )
Error: Request failed with status code 500.

Can someone pls take a look and let me know where I’m going wrong. Above code works if I set the filter on ‘Product Price’ rather than the ‘Discounted Price’ (which is what I actually want to use.)

Can someone help pls.