Skip to content

fix(storage): return 409 when deleting attached volume - #19

Merged
Matheus-Thurler merged 1 commit into
mainfrom
fix/volume-delete-409
Aug 5, 2026
Merged

fix(storage): return 409 when deleting attached volume#19
Matheus-Thurler merged 1 commit into
mainfrom
fix/volume-delete-409

Conversation

@Matheus-Thurler

Copy link
Copy Markdown
Contributor

Summary

  • Return 409 Conflict when deleting a volume still attached to a VM (was HTTP 500)
  • Return 404 for missing/wrong-tenant volume delete (typed IaaSError)
  • respondError now honors IaaSError.HTTPStatus() for typed service errors

Test plan

  • go test ./internal/service/storage/...
  • E2E phase-1-volumes on homelab — delete while attached returns 409

Map volume-in-use and not-found errors to IaaSError in DeleteVolume and
teach respondError to honor typed HTTP status codes. E2E now expects 409.
@Matheus-Thurler
Matheus-Thurler merged commit db6c5ce into main Aug 5, 2026
@Matheus-Thurler
Matheus-Thurler deleted the fix/volume-delete-409 branch August 6, 2026 20:20
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.

1 participant