fix(error): leaking table and function names when calculating hint

Increase similarity score to 0.75 from 0.33 for table and functions
error hint.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-03-06 16:03:21 -05:00
committed by Steve Chavez
parent 2861b35f41
commit 5abacba0d8
9 changed files with 66 additions and 21 deletions
+4 -4
View File
@@ -1768,11 +1768,11 @@ def test_client_error_verbosity_config(defaultenv):
}
with run(env=env) as postgrest:
response = postgrest.session.get("/itemsxx")
response = postgrest.session.get("/itemsx")
assert response.status_code == 404
assert response.json() == {
"code": "PGRST205",
"message": "Could not find the table 'public.itemsxx' in the schema cache",
"message": "Could not find the table 'public.itemsx' in the schema cache",
}
env = {
@@ -1781,11 +1781,11 @@ def test_client_error_verbosity_config(defaultenv):
}
with run(env=env) as postgrest:
response = postgrest.session.get("/itemsxx")
response = postgrest.session.get("/itemsx")
assert response.status_code == 404
assert response.json() == {
"code": "PGRST205",
"message": "Could not find the table 'public.itemsxx' in the schema cache",
"message": "Could not find the table 'public.itemsx' in the schema cache",
"details": None,
"hint": "Perhaps you meant the table 'public.items'",
}