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
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