Only create one intercom notifier #5510
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR makes it so that we only ever create a single
IntercomNotifier
, which does enough to resolve implicits that we don't get a null pointer exception when we share with existing users.Checklist
Notes
hide whitespace changes in review scalafmt got way too excited
There's still some kind of issue with
akka-streams
and an unsubscribed response entity that I'm working out, but this at least solves the immediate problem of "always error".I believe this will also require some frontend changes to report the information about which email addresses had unsuccessful shares, but I don't think we know what that should look like or if that's information that we will want that we're not worried about exposing to users. Since the errors were the result of NPEs for existing users only, I don't think there are actually real errors that we needed to report.
An issue is that bad email addresses don't show up as errors -- for example, our SMTP logs show that the server was perfectly happy to pass off the message to the azavea mail server for
jsantuc@azavea.com
. I'm not sure whether there's anything we can do about that.Testing Instructions
I don't know how to test the returning-all-errors part aside from trusting the
ValidatedNel
data type -- changes in eb5a35aCloses raster-foundry/groundwork#1108