Fix bug where parent was called twice.

Fixing bug where the parent error handler was called twice if an exception occurred whilst sending the event to Sentry (in `sentryCapture` function).