fix(cv-qa): protect import lifecycle races and terminal receipts
This commit is contained in:
@@ -239,6 +239,8 @@ public sealed partial class ProfileCvController
|
||||
}, HttpContext.RequestAborted);
|
||||
}
|
||||
catch (DbUpdateConcurrencyException) { return Conflict(new { code = "revision_conflict", message = "The career profile changed. Refresh the comparison and review your decisions." }); }
|
||||
// MariaDB can report a changed run as a snapshot conflict before EF sees zero affected rows.
|
||||
catch (DbUpdateException ex) when (ex.InnerException is MySqlConnector.MySqlException { Number: 1020 }) { return Conflict(new { code = "revision_conflict", message = "The import changed. Refresh the comparison and review your decisions." }); }
|
||||
catch (ArgumentException ex) { return BadRequest(ex.Message); }
|
||||
catch (CareerProjectionException ex) { return BadRequest(ex.Message); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user