Thread aborted when creating inventory items

When we ran a background task that should create about 2000 inventory items we got an ThreadAbortedException abruptly. Any ideas what one might doing wrong if this happens?

WebStockHandler - WebStockHandler unable to process stock for 883345 due to ex - 
Thread was being aborted. System.Threading.ThreadAbortException: Thread was being aborted.
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Litium.Application.Events.EventBrokerImpl.Publish[T](T message)
   at Litium.Application.Data.LitiumDbContext.ProcessEvents(List`1 postMessages)
   at Litium.Application.Data.LitiumDbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Litium.Application.Data.Batching.BatchDataImpl.Commit()
   at Litium.Application.Products.InventoryItemServiceImpl.Create(InventoryItem inventoryItem)
   at Jollyroom.Integration.Sap.Implementation.Handlers.WebStockHandler.Handle(MtWebStock response) in D:\a\1\s\src\Jollyroom.Integration.Sap.Implementation\Handlers\WebStockHandler.cs:line 81
2021-02-26 19:57:31.4570 [App:06] [] [WARN ] [] Error handle Message type: WebStock  - Thread was being aborted.

Litium version: 7.6

Seems like something happens in

InventoryItemServiceImpl.Create(InventoryItem inventoryItem)

Maybe WebStock is empty or null or something else is missing since it is tryng to create a InventoryItem and fails.
Is it possible to log a more detailed exception?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.