Skip to content

Commit 3c3b6bd

Browse files
authoredJun 10, 2022
feat: handle error cause (#131)
1 parent 8eb9969 commit 3c3b6bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/error.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function createError (input: string | Partial<H3Error>): H3Error {
3232
return input
3333
}
3434

35-
const err = new H3Error(input.message ?? input.statusMessage)
35+
const err = new H3Error(input.message ?? input.statusMessage, input.cause ? { cause: input.cause } : undefined)
3636

3737
if (input.statusCode) {
3838
err.statusCode = input.statusCode

0 commit comments

Comments
 (0)
Please sign in to comment.