import * as Sentry from "@sentry/node"
import { logger } from "../utils/logger.js"

export function testSentry(req, res) {
  try {
    throw new Error("Test Sentry Error")
  } catch (error) {
    Sentry.captureException(error)
    logger.info("Error captured by Sentry", req)
    res.status(200).send("Error sent to Sentry")
  }
}
