Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"knitwork": "^0.1.2",
"magic-string": "^0.26.7",
"mlly": "^0.5.16",
"nitropack": "npm:nitropack-edge@0.6.0-27768225.ba21751",
"nitropack": "npm:nitropack-edge@0.6.0-27768582.4603279",
"nuxi": "3.0.0-rc.11",
"ohash": "^0.1.5",
"ohmyfetch": "^0.4.20",
Expand Down
3 changes: 3 additions & 0 deletions packages/nuxt/src/core/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
devHandlers: [],
baseURL: nuxt.options.app.baseURL,
virtual: {},
routeRules: {
'/__nuxt_error': { cache: false }
},
runtimeConfig: {
...nuxt.options.runtimeConfig,
nitro: {
Expand Down
7 changes: 4 additions & 3 deletions packages/nuxt/src/core/runtime/nitro/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
}

// Set response code and message
event.res.statusCode = errorObject.statusCode as any as number
event.res.statusMessage = errorObject.statusMessage

event.res.statusCode = (errorObject.statusCode !== 200 && errorObject.statusCode) as any as number || 500
if (errorObject.statusMessage) {
event.res.statusMessage = errorObject.statusMessage
}
// Console output
if (error.unhandled || error.fatal) {
const tags = [
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/semver": "^7",
"@vitejs/plugin-vue": "^3.1.2",
"@vueuse/head": "~1.0.0-rc.9",
"nitropack": "npm:nitropack-edge@0.6.0-27768225.ba21751",
"nitropack": "npm:nitropack-edge@0.6.0-27768582.4603279",
"unbuild": "latest",
"vite": "~3.1.8"
},
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.