-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
5
-
False
-
None
-
False
-
-
Requests to all cost-mgmt API endpoints from users that do not have a corresponding Tenant will raise a ProgrammingError complaining about some table not existing. This is fine to handle and return an empty response to the user because that user does not technically exist for our application.
However, our implementation of this logic is capturing ALL ProgrammingErrors for all endpoints. So if there is a real problem querying a db table in a given tenant (or even the public tenant), we just return a 200 status. We should update our middleware such that it verifies the ProgrammingError is caused by a missing Tenant, rather than assuming it is.
An added benefit of doing this is that we will start seeing app-sre-alerts for real 5xx responses which we were never seeing previously.