Commit fbd58557 authored by Martin Santangelo's avatar Martin Santangelo
Browse files

Merge branch 'fix-non-error-exception-in-sentry' into 'release/3.12.0'

Fix non error exception in sentry

See merge request !419
parents ccd26f8e 1dbd5169
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -69,13 +69,18 @@ class LogService {
  }
  }


  exception(prepend, error) {
  exception(prepend, error) {

    if (!error) {
    if (!error) {
      error = prepend;
      error = prepend;
      prepend = null;
      prepend = null;
    }
    }


    if (!isNetworkFail(error) && !isUserError(error) && !isAbort(error) && (!this.isApiError(error) || this.isUnexpectedError(error))) {
    if (
      error instanceof Error &&
      !isNetworkFail(error) &&
      !isUserError(error) &&
      !isAbort(error) &&
      (!this.isApiError(error) || this.isUnexpectedError(error))
    ) {
      // report the issue to sentry
      // report the issue to sentry
      Sentry.captureException(error);
      Sentry.captureException(error);


+2 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,8 @@ export default class Router {
          } else if (entity_type[0] === 'object') {
          } else if (entity_type[0] === 'object') {
            navigation.push('Activity', { guid: data.json.entity_guid });
            navigation.push('Activity', { guid: data.json.entity_guid });
          } else {
          } else {
            logService.exception('[DeepLinkRouter] Unknown notification:', entity_type, data);
            const err = new Error(`[DeepLinkRouter] Unknown notification, entity_type: ${entity_type}`);
            logService.exception('[DeepLinkRouter] Unknown notification:', err);
          }
          }


          break;
          break;