minhnt-dev: detail page

This commit is contained in:
MoreStrive
2024-05-31 00:55:48 +07:00
parent 059ab5463c
commit 86bebfd66e
3 changed files with 13 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
import { H3Error} from 'h3'
export function handleError(error: any){
const h3Error = new H3Error('')
h3Error.statusCode = error.statusCode||500
h3Error.statusMessage = error.statusMessage||'Internal Server Error'
h3Error.data = error.data
throw createError(h3Error)
}