Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

Should build fail if publishRelease fail because Sentry instance is down ? #584

Closed

Description

@mrleblanc101

Hi,
Should build fail if publishRelease fail because Sentry instance is down ?
I'm trying to deploy my app, and our self-hosted Sentry is currently down.
I can't deploy because I have publishRelease: true which fails.
Should we have an option to ignore this is complete the build ?

Activity

  1. rchl commented on Jun 12, 2023

    @rchl
    Contributor

    I think you might be able to do that already using the publishRelease.errorHandler option. It's part of Sentry own types and is documented as:

        /**
         * When a CLI error occurs, the plugin will call this function.
         *
         * By default, it will call `invokeErr()`, thereby stopping Webpack
         * compilation. To allow compilation to continue and log a warning instead,
         * set this to
         *   (err, invokeErr, compilation) => {
         *     compilation.warnings.push('Sentry CLI Plugin: ' + err.message)
         *   }
         *
         * Note: `compilation` is typed as `unknown` in order to preserve
         * compatibility with both Webpack 4 and Webpack 5 types, If you need the
         * correct type, in Webpack 4 use `compilation.Compilation` and in Webpack 5
         * use `Compilation`.
         */
        errorHandler?: (
          err: Error,
          invokeErr: () => void,
          compilation: unknown
        ) => void;

    BTW. There is also this Nuxt issue that causes Sentry errors during publishing to be hidden: nuxt/nuxt#21284
    Not sure if you were also hit by this and had to guess what the issue is when it happened?

  2. mrleblanc101 commented on Jun 12, 2023

    @mrleblanc101
    Author

    @rchl Thanks for the tip, will try !
    The error seems to work for me:
    Capture d’écran, le 2023-06-12 à 10 17 58
    Which is indeed caused by the fact that our self-hosted Sentry is down:
    Capture d’écran, le 2023-06-12 à 10 22 40

  3. mrleblanc101 commented on Jun 13, 2023

    @mrleblanc101
    Author

    I was not able to make it work.
    I tried both in my nuxt.config.js:

    sentry: {
        config: {
            errorHandler: (err, invokeErr, compilation) => {
                compilation.warnings.push('Sentry CLI Plugin: ' + err.message);
            },
        },
    },
    

    And

    sentry: {
          errorHandler: (err, invokeErr, compilation) => {
              compilation.warnings.push('Sentry CLI Plugin: ' + err.message);
          },
    },
    
  4. rchl commented on Jun 13, 2023

    @rchl
    Contributor
    sentry: {
      publishRelease: {
        errorHandler: ...
      }
    }
    
  5. mrleblanc101 commented on Jun 13, 2023

    @mrleblanc101
    Author

    @rchl The only possibility I didn't try I guess 😅
    Thanks, I searched in the Sentry documentation instead of the sentry-webpack-plugin documentation.

  6. locked and limited conversation to collaborators on Jun 13, 2023
  7. converted this issue into a discussion #585 on Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions