fix(loyalty): replace broad exception handlers with specific types and rename onboarding service
- Replace `except Exception` with specific exception types in google_wallet_service.py (requests.RequestException, ValueError, etc.) and apple_wallet_service.py (httpx.HTTPError, OSError, ssl.SSLError) - Rename loyalty_onboarding.py -> loyalty_onboarding_service.py to match NAM-002 naming convention (+ test file + imports) - Add PasswordChangeResponse Pydantic model to user_account API, removing raw dict return and noqa suppression Resolves 12 EXC-003 + 1 NAM-002 architecture warnings in loyalty module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,3 +56,9 @@ class UserPasswordChange(BaseModel):
|
||||
if not any(char.isalpha() for char in v):
|
||||
raise ValueError("Password must contain at least one letter")
|
||||
return v
|
||||
|
||||
|
||||
class PasswordChangeResponse(BaseModel):
|
||||
"""Response for a successful password change."""
|
||||
|
||||
message: str
|
||||
|
||||
Reference in New Issue
Block a user