awslabs / sbt-aws

SaaS Builder Toolkit for AWS is a developer toolkit to implement SaaS best practices and increase developer velocity.
Apache License 2.0
92 stars 16 forks source link

ControlPlane-TenantManagement-TenantDelete: Accepts tenant ids that don't exist #8

Closed somensi-aws closed 3 months ago

somensi-aws commented 3 months ago

Describe the bug

When running DELETE /tenants/{tenantId}, if tenantId doesn't exist, the service accepts the request, and writes a new record to the TenantDetails DynamoDB table.

Expected Behavior

When TenantID does not exist, the service should return 404.

Current Behavior

Returns 200 and writes new entry to TenantDetails table

Reproduction Steps

invoke DELETE /tenant/tenantId with tenantId that does not exist in the database

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.131.0 (build 92b912d)

Framework Version

No response

Node.js Version

v18.19.0

OS

Debian GNU/Linux 12 (bookworm)

Language

TypeScript

Language Version

No response

Other information

No response

suhussai commented 3 months ago

Thanks for reporting this!

Fix proposed in #11