Skip to content

Commit

Permalink
add if/else alternative to matching
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed May 6, 2024
1 parent e205bc1 commit 41e7eaa
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/celery/process_pinpoint_receipts_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,22 @@ def determine_pinpoint_status(status: str, provider_response: str) -> Union[str,
return NOTIFICATION_PERMANENT_FAILURE

return None

# Alternative:
#
# if "blocked" in response_lower:
# return NOTIFICATION_TECHNICAL_FAILURE
# elif "invalid" in response_lower:
# return NOTIFICATION_TECHNICAL_FAILURE
# elif "is opted out" in response_lower:
# return NOTIFICATION_PERMANENT_FAILURE
# elif "unknown error" in response_lower:
# return NOTIFICATION_TECHNICAL_FAILURE
# elif "exceed max price" in response_lower:
# return NOTIFICATION_TECHNICAL_FAILURE
# elif "Phone carrier is currently unreachable/unavailable" in response_lower:
# return NOTIFICATION_TEMPORARY_FAILURE
# elif "Phone is currently unreachable/unavailable" in response_lower:
# return NOTIFICATION_PERMANENT_FAILURE
# else:
# return None

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

0 comments on commit 41e7eaa

Please sign in to comment.