Skip to content

Commit 306b469

Browse files
committed
code overview
1 parent d5ba130 commit 306b469

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

mns_subscription/models/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Code(str, Enum):
1414
invalid = "invalid or missing access token"
1515
server_error = "internal server error"
1616
invariant = "invariant"
17-
not_supported = "not-supported"
17+
incomplete = "parameter-incomplete"
1818
duplicate = "duplicate"
1919
# Added an unauthorized code its used when returning a response for an unauthorized vaccine type search.
2020
unauthorized = "unauthorized"
@@ -129,7 +129,7 @@ def to_operation_outcome(self) -> dict:
129129
return create_operation_outcome(
130130
resource_id=str(uuid.uuid4()),
131131
severity=Severity.error,
132-
code=Code.server_error,
132+
code=Code.incomplete,
133133
diagnostics=self.__str__(),
134134
)
135135

mns_subscription/src/mns_service.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ def __init__(self, authenticator: AppRestrictedAuth):
4747
def subscribe_notification(self) -> dict | None:
4848

4949
response = requests.post(MNS_URL, headers=self.request_headers, data=json.dumps(self.subscription_payload))
50-
51-
print(f"Access Token: {self.access_token}")
52-
print(f"SQS ARN: {SQS_ARN}")
53-
print(f"MNS_URL: {MNS_URL}")
54-
print(f"Headers: {self.request_headers}")
55-
print(f"Payload: {json.dumps(self.subscription_payload, indent=2)}")
56-
5750
if response.status_code in (200, 201):
5851
return response.json()
5952
else:

mns_subscription/tests/test_mns_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def test_check_delete_subscription_no_resource(self, mock_get_subscription):
241241
@patch.object(MnsService, "get_subscription")
242242
def test_check_delete_subscription_missing_id(self, mock_get_subscription):
243243
# Resource with no id field
244-
mock_get_subscription.return_value = {"not_id": "nope"}
244+
mock_get_subscription.return_value = {"not_id": "not-id"}
245245
service = MnsService(self.authenticator)
246246
result = service.check_delete_subcription()
247247
self.assertEqual(result, "Subscription resource missing 'id' field.")

0 commit comments

Comments
 (0)