Developer forum

Forum » Ecommerce - Standard features » Stack trace being exposed when saving order

Stack trace being exposed when saving order

Andrew Rushworth
Reply

in DW 9 when saving an order and the field length exceeds the SQL column, then the error is rendered on the page in in the model output:

System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated. The statement has been terminated. at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at Dynamicweb.Ecommerce.Orders.OrderRepository.Save(Order order) at Dynamicweb.Ecommerce.Orders.OrderService.Save(Order order, Boolean saveOldVersion) at Dynamicweb.Ecommerce.Cart.Frontend.SetPostValues(Order order, Boolean isUserDetailsRefreshed) at Dynamicweb.Ecommerce.Cart.Frontend.GetContent() ClientConnectionId:06d486ff-8df4-4406-a718-0ab64d963ae7 Error Number:8152,State:30,Class:16

I have the following debuggins settings on backend:

 

Screenshot_2026-08-14_142807.png

Replies

 
Andrew Rushworth
Reply

Essentially the issue not about controlling the limit of input, but rather to not show stack trace errors in frontend

 

You must be logged in to post in the forum