shoc-backend/Api.SeaHavenIndustries/Controllers
Alexandre Brandizzi 32de36f78c fix(backend): sanitize exception disclosure in changed API endpoints
Replace raw exception-message disclosure (ex.Message) returned to API
callers with a stable sanitized public message plus correlated structured
internal logging, across the endpoints changed in this PR.

- Add SanitizedErrors helper: logs the original exception at Error with a
  generated correlation id and returns a stable public message referencing
  it so support can trace without exposing internals.
- Inject ILogger<T> into the 14 changed controllers and route every
  ex.Message/dbex.Message disclosure through the helper, preserving status
  codes, response shapes, and business data (e.g. OpenWorkOrders).
- Leave FluentValidation (vex.Errors) and existing fixed-message catches
  untouched; out-of-scope controllers (Account/Contact/Employee/Asset/
  PMSchedule) are unchanged.
- Add focused tests proving internal exception text is not returned and
  that Error logging carrying the original exception is invoked.
2026-07-24 14:14:39 -03:00
..
AccountController.cs backend changes 2026-05-14 11:00:12 -05:00
AssetController.cs backend changes 2026-05-14 11:00:12 -05:00
AuthenticationController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
CalendarController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
CommonController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
ContactController.cs backend changes 2026-05-14 11:00:12 -05:00
DashboardController.cs refactor(api): enforce service and data-service boundaries 2026-07-24 10:27:35 -03:00
DispatchController.cs refactor(api): complete feature service boundaries 2026-07-24 11:24:05 -03:00
DispatchPublicController.cs Add vendor portal with token-based authentication 2026-04-20 12:01:53 -04:00
DropdownOptionsController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
EmployeeController.cs backend changes 2026-05-14 11:00:12 -05:00
FollowUpController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
LocationController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
PMScheduleController.cs backend changes 2026-05-14 11:00:12 -05:00
QuotesController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
SettingsController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
SyncController.cs refactor(workorders): enforce service and data boundaries 2026-07-24 11:30:22 -03:00
TaskListTemplateController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
UpliftController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
UserController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
VendorController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
VendorPortalController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
WorkOrderController.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00