- Added Sentry integration for error tracking across various components, including error boundaries and user actions. - Updated global error handling to capture exceptions and provide detailed feedback to users. - Enhanced user notifications with toast messages for actions such as credit management, image generation, and canvas exports. - Improved user experience by displaying relevant messages during interactions, ensuring better visibility of system states and errors.
14 lines
326 B
TypeScript
14 lines
326 B
TypeScript
import * as Sentry from "@sentry/nextjs";
|
|
|
|
export async function register() {
|
|
if (process.env.NEXT_RUNTIME === "nodejs") {
|
|
await import("./sentry.server.config");
|
|
}
|
|
|
|
if (process.env.NEXT_RUNTIME === "edge") {
|
|
await import("./sentry.edge.config");
|
|
}
|
|
}
|
|
|
|
export const onRequestError = Sentry.captureRequestError;
|