mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix: remove logging of secret things
This commit is contained in:
@@ -76,7 +76,7 @@ class GoogleOAuthHandler(BaseOAuthHandler):
|
||||
logger.debug(f"Scopes granted by Google: {granted_scopes}")
|
||||
|
||||
google_creds = flow.credentials
|
||||
logger.debug(f"Received credentials: {google_creds}")
|
||||
logger.debug("Received credentials")
|
||||
|
||||
logger.debug("Requesting user email")
|
||||
username = self._request_email(google_creds)
|
||||
|
||||
@@ -127,9 +127,8 @@ class TwitterOAuthHandler(BaseOAuthHandler):
|
||||
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except req.exceptions.HTTPError as e:
|
||||
print("HTTP Error:", e)
|
||||
print("Response Content:", response.text)
|
||||
except req.exceptions.HTTPError:
|
||||
print(f"HTTP Error: {response.status_code}")
|
||||
raise
|
||||
|
||||
tokens = response.json()
|
||||
@@ -166,9 +165,8 @@ class TwitterOAuthHandler(BaseOAuthHandler):
|
||||
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except req.exceptions.HTTPError as e:
|
||||
print("HTTP Error:", e)
|
||||
print("Response Content:", response.text)
|
||||
except req.exceptions.HTTPError:
|
||||
print(f"HTTP Error: {response.status_code}")
|
||||
raise
|
||||
|
||||
return response.status_code == 200
|
||||
|
||||
@@ -36,11 +36,11 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@router.post("/unsubscribe")
|
||||
async def unsubscribe_via_one_click(token: Annotated[str, Query()]):
|
||||
logger.info(f"Received unsubscribe request from One Click Unsubscribe: {token}")
|
||||
logger.info("Received unsubscribe request from One Click Unsubscribe")
|
||||
try:
|
||||
await unsubscribe_user_by_token(token)
|
||||
except Exception as e:
|
||||
logger.exception("Unsubscribe token %s failed: %s", token, e)
|
||||
logger.exception("Unsubscribe failed: %s", e)
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail={"message": str(e), "hint": "Verify Postmark token settings."},
|
||||
|
||||
Reference in New Issue
Block a user