1+ """
2+ Copyright 2025 Google LLC
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ https://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ """
16+
117import os
218import sqlalchemy
319from flask import Flask
@@ -68,7 +84,7 @@ def password_auth_index():
6884 result = conn .execute (sqlalchemy .text ("SELECT 1" )).fetchall ()
6985 return f"Database connection successful (password authentication), result: { result } "
7086 except Exception as e :
71- return f"Error connecting to the database (password authentication): { e } " , 500
87+ return f"Error connecting to the database (password authentication)" , 500
7288
7389@app .route ("/iam" )
7490def iam_auth_index ():
@@ -77,7 +93,7 @@ def iam_auth_index():
7793 result = conn .execute (sqlalchemy .text ("SELECT 1" )).fetchall ()
7894 return f"Database connection successful (IAM authentication), result: { result } "
7995 except Exception as e :
80- return f"Error connecting to the database (IAM authentication): { e } " , 500
96+ return f"Error connecting to the database (IAM authentication)" , 500
8197
8298if __name__ == "__main__" :
8399 app .run (host = "0.0.0.0" , port = int (os .environ .get ("PORT" , 8080 )))
0 commit comments