Skip to content

[BUG] Docker down endpoint does not fail when a non-existent project is provided #35

@Archi657

Description

@Archi657

Bug Description

The [DELETE] /api/vps/v1/virtual-machines/{virtualMachineId}/docker/my-docker-project/down endpoint is returning a 200 status code when trying to delete a project which does not exist at all.

Steps to Reproduce

  1. Delete request to '/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{my-docker-project}/down'
  2. Write a non existant docker project
  3. Receive 200 status

Expected Behavior

404 not found for project not found would be useful

Actual Behavior

Status 200 received with a "started" state.

Screenshots

Image

Additional Context

When an incorrect virtualMachineId is used, returning a 403 Forbidden is helpful. However, returning a 200 OK when nothing is actually shut down can be misleading, as it suggests the process succeeded when no action was performed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions