From feb8b8bba5c36406457da2143e3751b0993e394a Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Fri, 8 Nov 2024 12:04:24 -0500 Subject: [PATCH] chore: remove logging on expected errors --- app/utils/headscale.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/utils/headscale.ts b/app/utils/headscale.ts index 80222ab..3ebbe3f 100644 --- a/app/utils/headscale.ts +++ b/app/utils/headscale.ts @@ -20,9 +20,6 @@ export class FatalError extends Error { export async function pull(url: string, key: string) { if (!key || key === 'undefined' || key.length === 0) { - log.error('APIC', 'Missing API key, could this be a cookie setting issue?') - log.error('APIC', 'Check that the hp_sess cookie is being set correctly') - log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false') throw new Error('Missing API key, could this be a cookie setting issue?') } @@ -46,9 +43,6 @@ export async function pull(url: string, key: string) { export async function post(url: string, key: string, body?: unknown) { if (!key || key === 'undefined' || key.length === 0) { - log.error('APIC', 'Missing API key, could this be a cookie setting issue?') - log.error('APIC', 'Check that the hp_sess cookie is being set correctly') - log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false') throw new Error('Missing API key, could this be a cookie setting issue?') } @@ -74,9 +68,6 @@ export async function post(url: string, key: string, body?: unknown) { export async function put(url: string, key: string, body?: unknown) { if (!key || key === 'undefined' || key.length === 0) { - log.error('APIC', 'Missing API key, could this be a cookie setting issue?') - log.error('APIC', 'Check that the hp_sess cookie is being set correctly') - log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false') throw new Error('Missing API key, could this be a cookie setting issue?') } @@ -102,9 +93,6 @@ export async function put(url: string, key: string, body?: unknown) { export async function del(url: string, key: string) { if (!key || key === 'undefined' || key.length === 0) { - log.error('APIC', 'Missing API key, could this be a cookie setting issue?') - log.error('APIC', 'Check that the hp_sess cookie is being set correctly') - log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false') throw new Error('Missing API key, could this be a cookie setting issue?') }