This commit is contained in:
MoreStrive
2024-05-30 18:06:50 +07:00
parent 8ca31c6b18
commit 2aa5607c48
147 changed files with 5815 additions and 1 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)
}