diff --git a/app/celery/process_pinpoint_receipts_tasks.py b/app/celery/process_pinpoint_receipts_tasks.py index b3e0edac52..277e041b41 100644 --- a/app/celery/process_pinpoint_receipts_tasks.py +++ b/app/celery/process_pinpoint_receipts_tasks.py @@ -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