Nitro · Migration

NITRO0015Replace removed H3 send utilities

H3 v2 removes send() and sendError() in favor of returned values and thrown errors.

Why it happens

H3 v2 handlers use Web API response values and HTTPError instead of imperative send helpers.

Fix

Return the response value from the handler, or throw an HTTPError for an error response.

Example

Return the response body

Before

export default defineHandler((event) => {
  return send(event, "ready")
})

After

export default defineHandler(() => {
  return "ready"
})

Verify the fix

Run only this rule after editing so the report stays focused on the diagnostic you are closing:

pnpm vite-doctor . --framework nitro --rules nitro/h3/no-removed-send
Copyright © 2026