Database.upsert() Lock Errors: The Silent Failure Pattern
When Database.upsert() encounters UNABLE_TO_LOCK_ROW, the error appears in UpsertResult objects — not as an exception. Without explicit handling, lock contention silently drops records.
When Database.upsert() encounters UNABLE_TO_LOCK_ROW, the error appears in UpsertResult objects — not as an exception. Without explicit handling, lock contention silently drops records.
How to handle, propagate, and display errors consistently between Apex and LWC, including the AuraHandledException pattern and a universal error extraction utility.