Skip to content

fix(backend): guard vehicle deletion and align error code field acros…#6

Merged
omarmaaref merged 1 commit into
mainfrom
bug/vehicule-delete-bug
Jul 19, 2026
Merged

fix(backend): guard vehicle deletion and align error code field acros…#6
omarmaaref merged 1 commit into
mainfrom
bug/vehicule-delete-bug

Conversation

@omarmaaref

Copy link
Copy Markdown
Owner

…s clients

  • Block DELETE /vehicles/:id while the vehicle is online or assigned; throws VehicleStillAssignedError (VEHICLE_STILL_ASSIGNED) or VehicleOnlineError (VEHICLE_ONLINE) — both map to 409 via the existing DomainExceptionFilter, keeping the error envelope consistent.
  • Add Swagger conflict examples on the DELETE endpoint.
  • Fix admin-dashboard ApiErrorBody.code → error (field mismatch with the filter's response shape; operator-dashboard was already correct).
  • Remove broken boilerplate e2e test (tested GET / → 'Hello World!' which never existed in this app).
  • Document concurrency-test sequential-execution limitation in README.

Summary

Changes

  • Backend:
  • Frontend:
  • Infra / CI:
  • Docs:

Testing

  • npm test in apps/backend passes
  • npx tsc --noEmit passes in both apps
  • Manually verified via the operator dashboard
  • Manually verified via the Swagger UI at /docs

Notes for reviewers

…s clients

- Block DELETE /vehicles/:id while the vehicle is online or assigned;
  throws VehicleStillAssignedError (VEHICLE_STILL_ASSIGNED) or
  VehicleOnlineError (VEHICLE_ONLINE) — both map to 409 via the existing
  DomainExceptionFilter, keeping the error envelope consistent.
- Add Swagger conflict examples on the DELETE endpoint.
- Fix admin-dashboard ApiErrorBody.code → error (field mismatch with the
  filter's response shape; operator-dashboard was already correct).
- Remove broken boilerplate e2e test (tested GET / → 'Hello World!' which
  never existed in this app).
- Document concurrency-test sequential-execution limitation in README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@omarmaaref
omarmaaref merged commit 4eeb39c into main Jul 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants