File tree Expand file tree Collapse file tree 3 files changed +1
-37
lines changed
lambdas/report-sender/report_sender Expand file tree Collapse file tree 3 files changed +1
-37
lines changed Original file line number Diff line number Diff line change 22Module representing possible errors within this application
33"""
44
5- import traceback
6-
7-
8- class AuthorizationError (Exception ):
9- """
10- Error representing when a sender is not authorized to perform the requested action
11- """
12-
13-
14- class InvalidMeshEndpointError (Exception ):
15- """
16- Indicates an invalid MESH endpoint in configuration
17- """
18-
19-
20- class InvalidEnvironmentVariableError (Exception ):
21- """
22- Indicates an invalid environment variable
23- """
24-
25- class InvalidRecordError (Exception ):
26- """
27- Indicates an invalid record in SQS message
28- """
29-
305class InvalidSenderDetailsError (Exception ):
316 """
327 Indicates that the sender is missing or the details are invalid
338 """
34-
35- def format_exception (exception ):
36- """
37- Returns a nicely formatted exception string
38- """
39- return '' .join (traceback .format_exception (
40- type (exception ), exception , exception .__traceback__ ))
Original file line number Diff line number Diff line change 1- from .errors import format_exception
1+ from dl_utils .errors import format_exception
22from mesh_client import MeshClient
33
44MESH_MESSAGE_WORKFLOW_ID = 'NHS_NOTIFY_DIGITAL_LETTERS_DAILY_REPORT'
Original file line number Diff line number Diff line change 99from pydantic import ValidationError
1010from digital_letters_events import ReportGenerated , ReportSent
1111
12- ACKNOWLEDGED_MESSAGE = 'acknowledged message'
13- PROCESSING_MESSAGE = 'processing message'
14- MESH_MESSAGE_WORKFLOW_ID = 'NHS_NOTIFY_DIGITAL_LETTERS_DAILY_REPORT'
15-
1612class ReportSenderProcessor : # pylint: disable=too-many-instance-attributes
1713 """
1814 Class that processes messages from a MESH inbox
You can’t perform that action at this time.
0 commit comments