Skip to content

Commit

Permalink
fix case
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed May 6, 2024
1 parent 41e7eaa commit 40e4c87
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions app/celery/process_pinpoint_receipts_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,28 +142,10 @@ def determine_pinpoint_status(status: str, provider_response: str) -> Union[str,
return NOTIFICATION_TECHNICAL_FAILURE
case response_lower if "exceed max price" in response_lower:
return NOTIFICATION_TECHNICAL_FAILURE
case "Phone carrier is currently unreachable/unavailable":
case "phone carrier is currently unreachable/unavailable":
return NOTIFICATION_TEMPORARY_FAILURE
case "Phone is currently unreachable/unavailable":
case "phone is currently unreachable/unavailable":
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

0 comments on commit 40e4c87

Please sign in to comment.