From 8e1a7848985a8ae3a8bf421296731faa8f92bcea Mon Sep 17 00:00:00 2001 From: jendiamond Date: Tue, 28 Jan 2025 14:16:28 -0800 Subject: [PATCH 01/10] comment out comments --- composables/useContentIndexer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composables/useContentIndexer.js b/composables/useContentIndexer.js index 7c803c61..70b4eb9b 100644 --- a/composables/useContentIndexer.js +++ b/composables/useContentIndexer.js @@ -62,11 +62,11 @@ export function useContentIndexer() { // console.log('Create a new document in ES:', await response.text()) } } else { - console.warn('not indexing anything') + //console.warn('not indexing anything') } } catch (e) { - console.error('skip indexing if connection times out during builds in the mean time: ' + e.message) - console.warn('skip indexing if connection times out during builds in the mean time: ' + e.message) + // console.error('skip indexing if connection times out during builds in the mean time: ' + e.message) + // console.warn('skip indexing if connection times out during builds in the mean time: ' + e.message) throw new Error('Elastic Search Indexing failed ' + e) // TODO uncomment when cause is clear } } From 3262196b99674fc0f6753c074f362dd377e2b625 Mon Sep 17 00:00:00 2001 From: jendiamond Date: Tue, 28 Jan 2025 14:32:17 -0800 Subject: [PATCH 02/10] update error.vue to have a default and linting --- composables/useContentIndexer.js | 2 +- error.vue | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/composables/useContentIndexer.js b/composables/useContentIndexer.js index 70b4eb9b..4f728845 100644 --- a/composables/useContentIndexer.js +++ b/composables/useContentIndexer.js @@ -62,7 +62,7 @@ export function useContentIndexer() { // console.log('Create a new document in ES:', await response.text()) } } else { - //console.warn('not indexing anything') + // console.warn('not indexing anything') } } catch (e) { // console.error('skip indexing if connection times out during builds in the mean time: ' + e.message) diff --git a/error.vue b/error.vue index ac911ab4..821a618b 100644 --- a/error.vue +++ b/error.vue @@ -3,10 +3,13 @@ import type { NuxtError } from '#app' import { SectionWrapper } from 'ucla-library-website-components' const props = defineProps({ - error: Object as () => NuxtError + error: { + type: Object as () => NuxtError, + default: () => ({ statusCode: 500, message: 'An unexpected error occurred' }), + }, }) -const isDevelopment = computed(() => import.meta.dev) +const isDevelopment = computed(() => import.meta.dev) -