Define policy on error handling/reporting within dynamic imports
When we utilize webpack's code-splitting features, the code that is dynamically imported is executed in the context of a Promise
callback. This muddies our error reporting in Sentry because unless we explicitly catch
and report the error, we'll get generic references to "Unhandled Promise Rejection" exceptions with useless stack traces.
We need to create a method for handling exceptions in dynamic imports which:
- Does not silently swallow the error
- Correctly reports errors and stack traces to Sentry
- Produces useful output in the developer console
- (when appropriate) Produces some user-facing error message.