Skip to content

Flushing with timeout doesn't timeout and eventually crashes  #3806

Description

@Vadorequest

Package + Version

  • @sentry/nextjs 6.9.0

Description

Using this code in a Next.js API:

import{captureException,flush,withSentry}from'@sentry/nextjs';consthandler=async()=>{try{thrownewError('This is a fake error meant to help testing Sentry error reporting (monitoring).');}catch(e){captureException(e);awaitflush(5000);// Need to flush on API to send errors properly (issue in @sentry/nextjs)}};exportdefaultwithSentry(handler);

Calling the API endpoint runs until the Serverless function times out.
Providing a value to flush() doesn't seem to be effective.

image

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions