Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
ItzNotABug opened this issue Sep 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ItzNotABug
Copy link
Contributor

馃憻 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?

@ItzNotABug ItzNotABug added the bug Something isn't working label Sep 13, 2023
@stnguyen90
Copy link
Contributor

@ItzNotABug, thanks for raising this issue! 馃檹馃徏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants