#Hot to get 'data' value of `createError`?

2 messages · Page 1 of 1 (latest)

river peak
pliant vapor
#

For some reason data passed as string in error.vue, you can just stringify it

throw createError({
  statusCode: 404,
  statusMessage: 'Page Not Found',
  data: JSON.stringify({
    test: 12345,
  }),
});```