includes status message on error
This commit is contained in:
@@ -42,7 +42,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!req.ok) throw createError({ statusCode: req.status })
|
if (!req.ok) throw createError({ statusCode: req.status, statusMessage: "Error"})
|
||||||
else {
|
else {
|
||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user