diff --git a/utils/functions/errorHandler.js b/utils/functions/errorHandler.js index bf2377a7..eb360f13 100644 --- a/utils/functions/errorHandler.js +++ b/utils/functions/errorHandler.js @@ -7,14 +7,14 @@ module.exports = function (config, themeConfig) { description = themeConfig?.error?.error404?.description || 'The page you are looking for does not exist.' + } else { + title = themeConfig?.error?.dbdError?.title || type.toString() + subtitle = themeConfig?.error?.dbdError?.subtitle || 'An error occurred' + description = + themeConfig?.error?.dbdError?.description || + 'Please contact us if the issue persists or try again later.' } - title = themeConfig?.error?.dbdError?.title || type.toString() - subtitle = themeConfig?.error?.dbdError?.subtitle || 'An error occurred' - description = - themeConfig?.error?.dbdError?.description || - 'Please contact us if the issue persists or try again later.' - if (error) { console.error(error) }