Skip to content

Commit

Permalink
fix: Set transaction on scope in node for request (#2769)
Browse files Browse the repository at this point in the history
* fix: Set transaction on scope in node for request

* ci: Skip build for size check
  • Loading branch information
HazAT committed Jul 23, 2020
1 parent aa60eea commit 7956bd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Expand Up @@ -45,16 +45,14 @@ jobs:
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- uses: actions/download-artifact@v2
with:
name: build
path: ${{ github.workspace }}/packages
- uses: andresz1/size-limit-action@v1.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: echo "doing nothing"
skip_step: install
skip_step: build

job_lint:
name: Lint
Expand Down
5 changes: 5 additions & 0 deletions packages/node/src/handlers.ts
Expand Up @@ -407,6 +407,11 @@ export function errorHandler(options?: {

if (shouldHandleError(error)) {
withScope(_scope => {
// For some reason we need to set the transaction on the scope again
const transaction = (res as any).__sentry_transaction as Span;
if (transaction && _scope.getSpan() === undefined) {
_scope.setSpan(transaction);
}
const eventId = captureException(error);
(res as any).sentry = eventId;
next(error);
Expand Down

0 comments on commit 7956bd8

Please sign in to comment.