export default defineEventHandler(async (event) => {
  try {
    // logic middleware
  } catch (error) {
    console.error('Middleware error:', error)
    throw createError({
      statusCode: 500,
      statusMessage: 'Internal Server Error',
      message: error?.message || 'Unknown error'
    })
  }
})