Azure Function on Linux Plan throws an Exception status code(500) without any description

Hi!
I’m using the “Aspose.Cells” library inside an Azure durable Function.
After successful execution of the logic associated with Excel,
the IDurableOrchestrationContext status changes
(context.SetCustomStatus(“Success”)).
At the front, every 2 seconds we contact Azure Function in order to get the execution status.
If the status was successful or unsuccessful, the status check is aborted.
When the status is Running, the code continues to chime every 2 seconds to check the status.
Previously, Azure Function itself used Windows Plan and everything worked as expected.
However, the decision was made to switch to the Linux plan.
From then on, the code on the front, in which the logic was written to check the status every 2 seconds, began to break with error 500 without any description.
Moreover, in Azure Portal App Insights, despite logging, no errors were detected.
After searching, it was finally found what was causing the problem.
It turned out that when using the class
var wb = new Workbook();
wb.Dispose();
the code at the front began to break.
Once the Workbook class was commented out, no error was received.
When implementing the Retry pattern on the front, after several attempts, it was possible to take the execution status of the Azure Function, and the execution completed successfully.
The challenge is to understand what causes this behavior.

@Nabil.Gasanov
Would you like to provide your sample file and executable Console project? We will check it soon.