-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nextjs: No way to call "consumeError" #6692
Comments
@Negan1911 the octal escape character issue is happening because ansi-color is using old invalid octal character Some dependency in your next project might still be using ansi-color package and to fix it temporarily you can change the character there in path |
Just to add some context. If you create a new app router project, this error occurs. Steps to repo:
import { AppRouterHighlight } from '@highlight-run/next/server'
export const withAppRouterHighlight = AppRouterHighlight({
projectID: "project_id",
}) import { NextRequest } from 'next/server'
import { withAppRouterHighlight } from '../../utils/app-router-highlight.config'
export const GET = withAppRouterHighlight(async function GET(request: NextRequest) {
console.info('Highlighting route')
if (Math.random() < 0.8) {
return new Response('Success')
} else {
throw new Error('Error')
}
})
The PR is almost 4 years old, so it unlikely that it will ever be merged at this point. |
@perkinsjr I completely missed the PR date, my bad! Thanks for calling out. |
Same error |
I figured out how to bundle the |
I love OTEL, I really do. But I've had to patching OTEL and Protobuf a fair bit to get Vercel support rolling. |
- Repairing the client import by publishing `client.d.ts` - Repair `clean-dist.sh` - Internalize `@highlight-run/sourcemap-uploader` - Downgrade `@opentelemetry/api` closes highlight#6747 closes highlight#6692
Describe the bug
I'm following the guide and trying to use the app router with
serverActions
, but looks like by default, our Server actions errors are not being tracked.We also can't use
consumeError
to catch the errors since@highlight-run/next/server
doesn't include it and@highlight-run/node
fails when being imported on NextJs (because ofansi-color
using Octal escape characters)The text was updated successfully, but these errors were encountered: