shoc-backend/Api.SeaHavenIndustries.Tests
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
..
Api.SeaHavenIndustries.Tests.csproj Add calendar/events backend API (#8) 2026-06-22 18:46:46 -04:00
ArchitectureTests.cs refactor(backend): enforce architecture and optimize dispatch 2026-07-24 12:07:48 -03:00
AuthenticationControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
AuthenticationServiceTests.cs refactor(backend): enforce architecture and optimize dispatch 2026-07-24 12:07:48 -03:00
CalendarControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
CalendarServiceTests.cs refactor(api): enforce service and data-service boundaries 2026-07-24 10:27:35 -03:00
DashboardServiceTests.cs refactor(api): enforce service and data-service boundaries 2026-07-24 10:27:35 -03:00
DispatchBatchingBehaviorTests.cs fix(architecture): address backend review follow-ups 2026-07-24 13:16:34 -03:00
DispatchControllerTests.cs refactor(api): complete feature service boundaries 2026-07-24 11:24:05 -03:00
DispatchServiceTests.cs refactor(api): complete feature service boundaries 2026-07-24 11:24:05 -03:00
DropdownOptionsServiceTests.cs refactor(api): enforce service and data-service boundaries 2026-07-24 10:27:35 -03:00
FollowUpControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
FollowUpServiceTests.cs refactor(api): complete feature service boundaries 2026-07-24 11:24:05 -03:00
IdentityTestHelpers.cs refactor(identity): enforce service and data boundaries 2026-07-24 11:24:09 -03:00
LocationControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
LocationServiceTests.cs refactor(api): complete feature service boundaries 2026-07-24 11:24:05 -03:00
SanitizedErrorsTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
ServiceBehaviorTests.cs refactor(backend): enforce architecture and optimize dispatch 2026-07-24 12:07:48 -03:00
ServiceRegistrationTests.cs fix(architecture): address backend review follow-ups 2026-07-24 13:16:34 -03:00
SettingsControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
SettingsServiceTests.cs refactor(api): complete feature service boundaries 2026-07-24 11:24:05 -03:00
TaskListTemplateServiceTests.cs refactor(api): enforce service and data-service boundaries 2026-07-24 10:27:35 -03:00
UpliftControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
UserControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
UserServiceTests.cs refactor(identity): enforce service and data boundaries 2026-07-24 11:24:09 -03:00
VendorControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
VendorDataServiceTests.cs fix(vendors): preserve company and phone integrity 2026-07-23 19:17:14 -03:00
VendorPortalControllerTests.cs fix(backend): sanitize exception disclosure in changed API endpoints 2026-07-24 14:14:39 -03:00
VendorServiceTests.cs refactor(backend): enforce architecture and optimize dispatch 2026-07-24 12:07:48 -03:00
WorkOrderDataServiceBatchingTests.cs refactor(backend): enforce architecture and optimize dispatch 2026-07-24 12:07:48 -03:00