message: browser/base_notifier: move notice creation into a separate function
diff: @@ -119,17 +119,7 @@ export class BaseNotifier {
  err = { error: err };
  }
  - let notice: INotice = {
  - errors: [],
  - context: {
  - severity: 'error',
  - ...this.scope().context(),
  - ...err.context,
  - },
  - params: err.params || {},
  - environment: err.environment || {},
  - session: err.session || {},
  - };
  + let notice = this.newNotice(err);
  if (!this._opt.errorNotifications) {
  notice.error = new Error(
  @@ -166,6 +156,20 @@ export class BaseNotifier {
  return this._sendNotice(notice);
  }
  + private newNotice(err: any): INotice {
  + return {
  + errors: [],
  + context: {
  + severity: 'error',
  + ...this.scope().context(),
  + ...err.context,
  + },
  + params: err.params || {},
  + environment: err.environment || {},
  + session: err.session || {},
  + };
  + }
  +
  _sendNotice(notice: INotice): Promise<INotice> {
  let body = jsonifyNotice(notice, {
  keysBlocklist: this._opt.keysBlocklist,
  