fix: OAuth2 exception should be 403 (#40074)

(cherry picked from commit 736a51c13f)
This commit is contained in:
Beto Dealmeida
2026-05-15 13:53:02 -04:00
committed by Joe Li
parent 1666be2b95
commit eeedcaf47b
2 changed files with 4 additions and 4 deletions

View File

@@ -2248,7 +2248,7 @@ def test_catalogs_with_oauth2(
security_manager.get_catalogs_accessible_by_user.return_value = {"db2"}
response = client.get("/api/v1/database/1/catalogs/")
assert response.status_code == 500
assert response.status_code == 403
assert response.json == {
"errors": [
{
@@ -2349,7 +2349,7 @@ def test_schemas_with_oauth2(
security_manager.get_schemas_accessible_by_user.return_value = {"schema2"}
response = client.get("/api/v1/database/1/schemas/")
assert response.status_code == 500
assert response.status_code == 403
assert response.json == {
"errors": [
{