Skip to content

Commit

Permalink
noticeError is the only thing working
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell committed Dec 20, 2024
1 parent e4e6c15 commit e8e110c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
7 changes: 0 additions & 7 deletions app/divisions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ export default async function Divisions() {
if (data?.headers?.code === "404") {
redirect("/404");
}

if ((window as any).newrelic) {
(window as any).newrelic.log("test log from divisions server component", {
level: "error",
});
}

return (
<Suspense>
<DivisionsPage summary={data?.summary} divisions={data?.divisions} />
Expand Down
8 changes: 1 addition & 7 deletions app/test-error/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ import { useEffect } from "react";

export default function TestError() {
useEffect(() => {
// Send error to New Relic
if ((window as any).newrelic) {
(window as any).newrelic.log("Test error for New Relic", {
level: "warn",
});
}
throw new Error("Test error");
throw new Error("Test error for New Relic");
}, []);
}

0 comments on commit e8e110c

Please sign in to comment.