Developer forum

Forum » Ecommerce - Standard features » Favorites SQL exception in WebAPI

Favorites SQL exception in WebAPI

Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi there,

When trying to add a product to a favorites list using WebAPI we get a sql exception regarding the FK:

ExceptionMessage": "The INSERT statement conflicted with the FOREIGN KEY constraint \"FK_EcomCustomerFavoriteProducts_EcomProducts\". The conflict occurred in database \"\", table \"dbo.EcomProducts\".\r\nThe statement has been terminated."

 

I noticed that LanguageId is part of the FK_EcomCustomerFavoriteProducts_EcomProducts, but the favorites endpoint is not taking language into consideration.

DW version: 9.16.7.

 

BR Mario


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Mario,

It seems that you are missing some updates (at least update 2105 from april 2019). Try to rerun the updates and see if that fixes the issue. Otherwise, you can take a closer look at the update log to see if there are any errors.

Votes for this answer: 1

 

You must be logged in to post in the forum