chore: remove GlitchTip test page after successful verification
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async ({ url }) => {
|
||||
if (url.searchParams.get('server_error') === '1') {
|
||||
// This unhandled throw is caught by handleError in hooks.server.ts,
|
||||
// which forwards it to GlitchTip via Sentry.captureException.
|
||||
throw new Error('GlitchTip server-side test error — ' + new Date().toISOString());
|
||||
}
|
||||
return {};
|
||||
};
|
||||
@@ -1,48 +0,0 @@
|
||||
<script lang="ts">
|
||||
import * as Sentry from '@sentry/sveltekit';
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
|
||||
function throwClientError() {
|
||||
throw new Error('GlitchTip client-side test error — ' + new Date().toISOString());
|
||||
}
|
||||
|
||||
function captureManual() {
|
||||
Sentry.captureException(
|
||||
new Error('GlitchTip manual capture test — ' + new Date().toISOString())
|
||||
);
|
||||
alert('Manually captured exception sent to GlitchTip.');
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="max-w-lg mx-auto py-16 flex flex-col gap-6">
|
||||
<h1 class="text-2xl font-bold text-zinc-100">GlitchTip Test Page</h1>
|
||||
<p class="text-zinc-400 text-sm">
|
||||
Use the buttons below to fire test errors. Check
|
||||
<a
|
||||
href="https://errors.libnovel.cc"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-amber-400 hover:text-amber-300 underline">errors.libnovel.cc</a
|
||||
> to confirm they arrive.
|
||||
</p>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<!-- Triggers an unhandled JS exception → caught by handleError in hooks.client.ts -->
|
||||
<Button variant="destructive" onclick={throwClientError}>
|
||||
Throw unhandled client-side error
|
||||
</Button>
|
||||
|
||||
<!-- Sends an exception directly via Sentry.captureException -->
|
||||
<Button variant="outline" onclick={captureManual}>
|
||||
Manually capture exception (Sentry.captureException)
|
||||
</Button>
|
||||
|
||||
<!-- SSR load error — visit this URL to trigger a server-side throw -->
|
||||
<a
|
||||
href="/glitchtip-test?server_error=1"
|
||||
class="text-sm text-zinc-400 hover:text-amber-400 underline text-center"
|
||||
>
|
||||
Trigger server-side load error (navigate here with ?server_error=1)
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user