ADR-026: Client-Side Logging + linting fixes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled

This commit is contained in:
2026-01-09 17:58:21 -08:00
parent 9ffcc9d65d
commit 25d6b76f6d
24 changed files with 242 additions and 195 deletions

View File

@@ -9,6 +9,7 @@ import {
useUpdateShoppingListItemMutation,
useRemoveShoppingListItemMutation,
} from './mutations';
import { logger } from '../services/logger.client';
import type { ShoppingListItem } from '../types';
/**
@@ -84,7 +85,7 @@ const useShoppingListsHook = () => {
await createListMutation.mutateAsync({ name });
} catch (error) {
// Error is already handled by the mutation hook (notification shown)
console.error('useShoppingLists: Failed to create list', error);
logger.error({ err: error }, '[useShoppingLists] Failed to create list');
}
},
[userProfile, createListMutation],
@@ -102,7 +103,7 @@ const useShoppingListsHook = () => {
await deleteListMutation.mutateAsync({ listId });
} catch (error) {
// Error is already handled by the mutation hook (notification shown)
console.error('useShoppingLists: Failed to delete list', error);
logger.error({ err: error }, '[useShoppingLists] Failed to delete list');
}
},
[userProfile, deleteListMutation],
@@ -123,7 +124,7 @@ const useShoppingListsHook = () => {
await addItemMutation.mutateAsync({ listId, item });
} catch (error) {
// Error is already handled by the mutation hook (notification shown)
console.error('useShoppingLists: Failed to add item', error);
logger.error({ err: error }, '[useShoppingLists] Failed to add item');
}
},
[userProfile, addItemMutation],
@@ -141,7 +142,7 @@ const useShoppingListsHook = () => {
await updateItemMutation.mutateAsync({ itemId, updates });
} catch (error) {
// Error is already handled by the mutation hook (notification shown)
console.error('useShoppingLists: Failed to update item', error);
logger.error({ err: error }, '[useShoppingLists] Failed to update item');
}
},
[userProfile, updateItemMutation],
@@ -159,7 +160,7 @@ const useShoppingListsHook = () => {
await removeItemMutation.mutateAsync({ itemId });
} catch (error) {
// Error is already handled by the mutation hook (notification shown)
console.error('useShoppingLists: Failed to remove item', error);
logger.error({ err: error }, '[useShoppingLists] Failed to remove item');
}
},
[userProfile, removeItemMutation],