Skip to content

Commit

Permalink
EZR: Add VANotify callback metadata to email notify job
Browse files Browse the repository at this point in the history
  • Loading branch information
dellerbie committed Jan 3, 2025
1 parent c541110 commit 842ccbe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app/sidekiq/hca/ezr_submission_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module HCA
class EzrSubmissionJob
include Sidekiq::Job
extend SentryLogging

FORM_ID = '10-10EZR'
VALIDATION_ERROR = HCA::SOAPParser::ValidationError
STATSD_KEY_PREFIX = 'api.1010ezr'
DD_ZSF_TAGS = [
Expand Down Expand Up @@ -57,7 +59,14 @@ def self.send_failure_email(parsed_form)
email,
template_id,
{ 'salutation' => salutation },
api_key
api_key,
{
callback_metadata: {
notification_type: 'error',
form_number: FORM_ID,
statsd_tags: DD_ZSF_TAGS
}
}
)
StatsD.increment("#{STATSD_KEY_PREFIX}.submission_failure_email_sent")
StatsD.increment('silent_failure_avoided_no_confirmation', tags: DD_ZSF_TAGS)
Expand Down
9 changes: 8 additions & 1 deletion spec/sidekiq/hca/ezr_submission_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@
{
'salutation' => "Dear #{form.dig('veteranFullName', 'first')},"
},
api_key
api_key,
{
callback_metadata: {
notification_type: 'error',
form_number: described_class::FORM_ID,
statsd_tags: described_class::DD_ZSF_TAGS
}
}
]
end

Expand Down

0 comments on commit 842ccbe

Please sign in to comment.