forked from cds-snc/notification-api
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip contact_information_tasks status and status_reasons
- Loading branch information
Chris Johnson
committed
Dec 16, 2024
1 parent
0c450d9
commit cb3ef9c
Showing
3 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,51 @@ | ||
from app.constants import ( | ||
STATUS_REASON_DECLINED, | ||
STATUS_REASON_NO_CONTACT, | ||
STATUS_REASON_NO_ID_FOUND, | ||
STATUS_REASON_NO_PROFILE, | ||
STATUS_REASON_RETRYABLE, | ||
) | ||
|
||
|
||
class VAProfileException(Exception): | ||
pass | ||
|
||
|
||
class VAProfileIdNotFoundException(VAProfileException): | ||
failure_reason = 'No VA Profile Id was found' | ||
status_reason = STATUS_REASON_NO_ID_FOUND | ||
|
||
|
||
class VAProfileRetryableException(VAProfileException): | ||
failure_reason = 'Retryable VAProfile error occurred' | ||
status_reason = STATUS_REASON_RETRYABLE | ||
|
||
|
||
class VAProfileNonRetryableException(VAProfileException): | ||
failure_reason = 'Non-retryable VAProfile error occurred' | ||
status_reason = STATUS_REASON_NO_PROFILE | ||
|
||
|
||
class NoContactInfoException(VAProfileNonRetryableException): | ||
failure_reason = 'No contact info found from VA Profile' | ||
status_reason = STATUS_REASON_NO_CONTACT | ||
|
||
|
||
class InvalidPhoneNumberException(VAProfileNonRetryableException): | ||
failure_reason = 'Phone number is invalid' | ||
status_reason = STATUS_REASON_NO_CONTACT | ||
|
||
|
||
class VAProfileIDNotFoundException(VAProfileNonRetryableException): | ||
failure_reason = 'No VA Profile account found' | ||
status_reason = STATUS_REASON_NO_PROFILE | ||
|
||
|
||
class ContactPreferencesException(VAProfileNonRetryableException): | ||
failure_reason = 'VA Profile contact preferences not allowing contact' | ||
status_reason = STATUS_REASON_DECLINED | ||
|
||
|
||
class CommunicationItemNotFoundException(VAProfileNonRetryableException): | ||
failure_reason = 'No communication bio found from VA Profile' | ||
status_reason = STATUS_REASON_DECLINED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters