We have one problem in a Production environment but we don’t see any issues in the local DEV environments.
Problem: I have one API - /api/GenerateAutoPdf/{Guid} (POST) Based on the response from this request we are opening a modal in the UI (Client). So if the response is 200 for the above POST request then the "Print modal" will open in the UI so that the user can select the generated PDF and then can print those generated PDF's from the modal.
If the response is 500 then the print modal will not open up, as there was a Internal server error.
In one scenario, even though the server responded with 500, the PDF's were generated but the "Print Modal" didn't show up as this was not a "200" OK response. The print modal didn't come up. This issue is really intermittent.
Question: While debugging the problem for finding the root cause for 500 error.
In the Event Viewer, I could see "OperationCanceledException" for this particular API request.
I went through some articles on finding the root cause for the "OperationCanceledException"
From most of them, the generic point was it might be due to client closing the browser window where the browser sends the cancellation token. But this is not the case and I am not able to reproduce the issue.
Additionally, there was a lot of "OperationCanceledExceptions" in the Event Viewer logs for different API's but for those, we are not really blocked. And this also tells that the user is not closing the browser window and also this is not happening for only some users where there could be browser issues with some users.
Does anyone have any inputs to resolve this or can you guys let me know the path forward for this issue or any tips for debugging this issue?
Does this issue occur when there are packet drops in the network?
Note: This is a server issue and client technology stack which we are using should not matter.