import { NextResponse } from "next/server" export function badRequest(body: unknown | string = "Bad request") { const resInit = { status: 400, } if (typeof body === "string") { return new NextResponse(body, resInit) } return NextResponse.json(body, resInit) } export function internalServerError( body: unknown | string = "Internal Server Error" ) { const resInit = { status: 500, } if (typeof body === "string") { return new NextResponse(body, resInit) } return NextResponse.json(body, resInit) }