til
TIL: Jul 9
tilengineering
TIL: When handling DB transactions in payment workflows, always re-throw errors instead of swallowing them; failing to propagate exceptions prevents the transaction from aborting, leading to inconsistent states where external payments succeed but internal records remain uncommitted. Additionally, when using Drizzle, use the spread operator to conditionally include fields in updates to ensure undefined values don't accidentally overwrite existing database columns.