Skip to content

[Bug]: Database not found #912

@Zonalds

Description

@Zonalds

Problem description

Description

When attempting to delete a KV database created through the Deno Subhosting API, the API returns a 404 Database not found error — even though the same database is listed successfully via the listing endpoint.

Steps to Reproduce

  1. Create a KV database using the Subhosting API:

    POST https://api.deno.com/v1/organizations/{orgId}/databases
  2. Verify the database appears in the listing:

    GET https://api.deno.com/v1/organizations/{orgId}/databases

    Example response:

    [
      {
        "id": "34f4e783-54e3-4b9f-9496-41e549178b94",
        "organizationId": "my_subhosting_org",
        "createdAt": "2025-10-18T23:56:15.891912Z"
      }
    ]
  3. Attempt to delete the database:

    DELETE https://api.deno.com/v1/organizations/{orgId}/databases/{dbId}
  4. The API responds with:

    {
      "error": "Database not found"
    }
    

Additional Notes

  • It’s unclear whether deletion should occur under /projects/{projectId}/databases/{dbId} instead of /organizations/{orgId}/databases/{dbId}.
  • Clarification in the API docs or a consistent delete endpoint would be helpful.

Steps to reproduce

Steps to Reproduce

  1. Create a KV database using the Subhosting API:

    POST https://api.deno.com/v1/organizations/{orgId}/databases
  2. Verify the database appears in the listing:

    GET https://api.deno.com/v1/organizations/{orgId}/databases

    Example response:

    [
      {
        "id": "34f4e783-54e3-4b9f-9496-41e549178b94",
        "organizationId": "my_subhosting_org",
        "createdAt": "2025-10-18T23:56:15.891912Z"
      }
    ]
  3. Attempt to delete the database:

    DELETE https://api.deno.com/v1/organizations/{orgId}/databases/{dbId}
  4. The API responds with:

    {
      "error": "Database not found"
    }
    

Expected behavior

Expected Behavior

The DELETE request should successfully remove the database, matching the resource ID returned from the listing endpoint.

Actual Behavior

The API returns 404 Database not found, even though the database exists and is visible via the list endpoint.

Environment

Environment

  • Organization type: Subhosting
  • API base: https://api.deno.com/v1
  • API version: Latest (as of Oct 2025)
  • Node version: v22.17.0
  • macOS: 12.x (Intel)

Possible solution

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions