Comparing version 0.2.1 to 0.2.2
@@ -5,2 +5,10 @@ # Changelog | ||
### [0.2.2](https://github.com/nuxt-contrib/h3/compare/v0.2.1...v0.2.2) (2021-01-20) | ||
### Bug Fixes | ||
* capture stacktrace from createError ([1441784](https://github.com/nuxt-contrib/h3/commit/14417846554f81f44ae677bfd609517dcfd3c291)) | ||
* handle thrown errors by each layer ([62fd25a](https://github.com/nuxt-contrib/h3/commit/62fd25a572de72a1f555b8f43e5e4798c392b74b)) | ||
### [0.2.1](https://github.com/nuxt-contrib/h3/compare/v0.2.0...v0.2.1) (2021-01-12) | ||
@@ -7,0 +15,0 @@ |
@@ -473,2 +473,3 @@ 'use strict'; | ||
const err = new H3Error(input.message); | ||
Error.captureStackTrace(err, createError); | ||
if (input.statusCode) { | ||
@@ -556,3 +557,10 @@ err.statusCode = input.statusCode; | ||
} | ||
const val = await layer.handle(req, res); | ||
let val; | ||
try { | ||
val = await layer.handle(req, res); | ||
} catch (err) { | ||
if (!res.writableEnded) { | ||
return sendError(res, err, true); | ||
} | ||
} | ||
if (res.writableEnded) { | ||
@@ -559,0 +567,0 @@ break; |
{ | ||
"name": "h3", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Tiny JavaScript Server", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/h3", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51903
1269