api-services-portal icon indicating copy to clipboard operation
api-services-portal copied to clipboard

Not receiving email when a request is submitted

Open ikethecoder opened this issue 3 years ago • 2 comments

API Services Portal Issue

User Story

As an Access Manager,
I want to be notified when there is a new access request.
so that I can approve access in a timely manner.

Test Case

ENV

  • [ ] DEV
  • [ ] TEST
  • [X] PROD

TESTCASE

  • As a Developer, I requested access to an API

EXPECTED

  • As an Access Manager of the API, I was expecting an email notifying me

ACTUAL

  • I did not receive the email

ERROR

Notes

ikethecoder avatar Mar 23 '22 17:03 ikethecoder

Logging:

verbose: [notification.service] Notification triggered
verbose: [notification.service] Notification triggered
verbose: [notification.service] Notification triggered
verbose: [notification.service] Notification triggered
debug: [keystone.access-req] Mutation [markAccessRequestAsNotIssued] result {"data":{"updateAccessRequest":{"id":"267"}}}
debug: [keystone.activity] [recordActivity] userid=272 name=update AccessRequest[267]
debug: [keystone.activity] [recordActivity] result {}
[ERROR] Sending notification failed!Error: No recipients defined
[SUCCESS] Notification sent to [email protected]
[SUCCESS] Notification sent to [email protected]
[SUCCESS] Notification sent to [email protected]

Different things to look at:

  • Make sure logging is with this.logger rather than console.log
  • "Notification triggered" missing user details logged
  • Error should provide some additional details, like the user that did not have recipient information
  • There are some users that have no email - need to investigate whether the JWT Claim mapping is setup properly

There is a related issue where the requesters are getting notified even when the provisioning fails:

  • Notifications are sent even when there is a failure to enable the client

ikethecoder avatar Mar 23 '22 18:03 ikethecoder

may be resolved by #452 - collect email for notifications

mwendowsky avatar Jul 14 '22 17:07 mwendowsky