Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update error handler to latest upstream version #761

Merged

Conversation

wattanx
Copy link
Collaborator

@wattanx wattanx commented May 6, 2023

πŸ”— Linked issue

#631

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I have ported the contents of nitro/error.ts from Nuxt 3. (I'm not very confident, though.)

By implementing it in the playground as shown below, I was able to confirm that the contents of the headers are not missing.

layouts/error.vue

<template>
  <div>Error page: {{ headers }}</div>
</template>

<script setup>
const { ssrContext } = useNuxtApp()
const headers = useState('headers', () => ssrContext?.req.headers)

</script>

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@wattanx wattanx changed the title fix: port the error handler from nuxt3 feat: port the error handler from nuxt3 May 6, 2023
@danielroe
Copy link
Member

you are on πŸ”₯

@danielroe danielroe changed the title feat: port the error handler from nuxt3 feat: update error handler to latest upstream version May 6, 2023
@danielroe danielroe merged commit e2be178 into nuxt:main May 6, 2023
@wattanx wattanx deleted the issue-631-port-error-handler-from-nuxt3 branch May 7, 2023 06:01
@danielroe danielroe mentioned this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants