Task
no error utilities in /src/lib
We should create a reusable error handling utility?
Something like:
// src/lib/api/errors.ts
export const API_ERRORS = {
UNAUTHORIZED: { message: "Unauthorized", status: 401 },
WORKSPACE_NOT_FOUND: { message: "Workspace not found or access denied", status: 403 },
// ...
}
export function handleApiError(error: unknown) {
// Centralized error handling logic
}
This would make error handling more consistent and maintainable for all endpoints