Skip to content

🐛 Bug Report: [Server Side SDK] - Incorrect Return Value for Functions.getDeployment with Invalid Deployment ID #6225

Closed
appwrite/sdk-generator
#1890

Description

@ItzNotABug

👟 Reproduction steps

When invoking the functions.getDeployment(...) method in the Server Side SDK with an empty deploymentId, the function unexpectedly returns a list of all deployments.

This behavior is similar to the functions.listDeployments(...) method.

const deploymentId = '';
const functionId = 'testFunction';
const deployment = await functions.getDeployment(functionId, deploymentId);

Above returns:

{
   "total": numberOfDeploymentsHere,
   "deployments":[
     { latestDeploymentInfo },
     { olderDeploymentInfo },
     { olderDeploymentInfo2 },
     { olderDeploymentInfo3 },
   ]
}

👍 Expected behavior

When the deploymentId is empty, the SDK should throw an AppwriteException instead of returning all deployments.

👎 Actual Behavior

The backend returns a list of all deployments/build.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Tested on : 1.3.8 & 1.4.2.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added
    bug
    on Sep 13, 2023
  2. stnguyen90 commented on Sep 14, 2023

    @stnguyen90
    Contributor

    @ItzNotABug, thanks for raising this issue! 🙏🏼

  3. HarshMN2345 commented on Sep 8, 2026

    @HarshMN2345
    Member
  4. added a commit that references this issue on Sep 13, 2026
    21a1db4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions