[NEXT] Frontend -> Client#1323
Conversation
| /** Normalizes the event so it is consistent with our domain interface. */ | ||
| function normalizeRavenEvent(event: SentryEvent): SentryEvent { | ||
| const ex = (event.exception || {}) as { values?: SentryException[] }; | ||
| const ex = ((event && event.exception) || {}) as { |
There was a problem hiding this comment.
There was an issue when running it with SDK loader thatevent was null/undefined.
There was a problem hiding this comment.
Can we fix this in captureEvent and change the top-level signature to SentryEvent | undefined? This is way too deep and also defies type checking.
| public constructor(client: Client<BrowserOptions>) { | ||
| this.client = client; | ||
| } | ||
| public constructor(private readonly options: BrowserOptions) {} |
There was a problem hiding this comment.
We probably also want the DSN here.
There was a problem hiding this comment.
I was thinking that we only pass in the options and if we need some fancy behavior our DSN class supports, we create a DSN object in the backend.
See: https://github.com/getsentry/raven-js/pull/1323/files#diff-261a7b228c5d644e74c94c3f99ba8a9eR147
There was a problem hiding this comment.
WFM. We can assume that the DSN must be valid at that point, so there's also no need to catch exceptions anymore.
No description provided.