getsentry / sentry-webpack-plugin

Repo moved to https://github.com/getsentry/sentry-javascript-bundler-plugins. Please open any issues/PRs there.
MIT License
662 stars 116 forks source link

Permission denied error while uploading source maps doesn't handle by "errorHandler" #404

Closed av-k closed 1 year ago

av-k commented 1 year ago

Environment

@sentry/webpack-plugin: 1.19.1 webpack: 5.38.1 self-hosted server

Steps to Reproduce

  1. Try to upload source maps using Sentry Webpack Plugin
  2. If you get an error like:

    error: API request failed caused by: sentry reported an error: [Errno 13] Permission denied: '/data/files/55/121c' (http status: 400)

this one doesn't catch by errorHandler, so that error is not possible to handle with Webpack compilation failure trigger or emit additional logs.

Expected Result

I'm expecting that any sentry CLI error will be handled by errorHandler function/option.

Actual Result

Logs example:

> Found 6 release files > Analyzing 6 sources > Analyzing completed in 0.409s > Rewriting sources > Rewriting completed in 0.912s > Adding source map references > Bundling files for upload... ~/dist/bundle-5462a50013f823233c6d-en.js.map > Bundling completed in 1.257s > Optimizing completed in 0.032s error: API request failed caused by: sentry reported an error: [Errno 13] Permission denied: '/data/files/55/121c' (http status: 400)

lforst commented 1 year ago

I think this should be fixed in v2 of the plugin. Feel free to reopen any time if you run into issues!