AI OnAI Off
Are you saying that the response returned from ContentDelieveryApi is not 404 for empty response? If so, then can you tell what specific api you are triggering?
And, if you are facing issue in returning 404 response for customApi contoller, then, you probably will need to change the response code manually like.
Response.StatusCode = 404;
For now, we are calling the friendly URL to ensure that the not-found handler properly handles the request, as shown below.
When I use the following API endpoint, https://localhost:8080/api/episerver/v3.0/content?ContentUrl={ContentUrl}, it returns an empty array instead of a 404 response
I'm working on a project using Optimizely CMS and commerce. We're doing A/B Testing and using a not-found handler from Geta. The issue is, we call the content delivery API twice for each page load, causing double views. I tried creating a custom provider to handle not-found content, but it returns an empty array instead of a 404 error. Can we change it to return a 404 error instead?"