Error.vue not working with createError?

I think I am confused about how to have a custom error page for showing 404 messages. I have a setup that is very similar to the one written in the CreateError docs: https://nuxt.com/docs/api/utils/create-error .

Its just a [title].vue dynamic page with this:
const { data: page } = await useAsyncData(page-${route.params.title}, () => {
return $directus.request($readItem('Pages', route.params.title, {
fields: ['', 'Page_Content....*']
}))
})

if (!page.value) {
throw createError({
statusCode: 404,
statusMessage: 'Page Not Found',
fatal: true
})
}

Is this supposed to send me to the error.vue page in the root of my project? Or is this not how it's designed? It currently shows a page like the attached image. Just wondering if I misunderstood the function of this util. Thanks!
Screenshot_2024-03-27_at_1.43.31_PM.png
Nuxt
Create an error object with additional metadata.
Was this page helpful?