Skip to content

v1.6.2

Latest

Choose a tag to compare

@cpojer cpojer released this 05 Nov 00:47
· 18 commits to main since this release
Immutable release. Only release title and notes can be modified.
  • Added isVoidActionError() to recognize action errors at any status, including thrown 401, 403, and 5xx errors. Available from all four framework adapters.
  • Fixed overlapping routes choosing the wrong handler. Pages, API routes, and WebSocket routes now consistently prefer more specific paths.
  • Fixed c.redirect() unintentionally forwarding incoming query parameters to its destination.
  • Fixed unnecessary static page-data requests during development and for pages with prerender = false, avoiding 404s and extra round trips.
  • Fixed Solid's useParams() returning stale parameters after client-side navigation.
  • Fixed Better Auth OAuth state not being shared correctly in local development.
  • Fixed framework _headers files being dropped on native Cloudflare deployments that preserve existing secrets.
  • Fixed configuration errors and diagnostics referring to void.json in projects using void.config.ts.

Thanks to @0froq, @dvkam, @karthickeyan-dev, @morinokami, @niteshseram, @yangshun, and @yujiym for their contributions!

Recognizing Action Errors

Use isVoidActionError() in error handling to distinguish failed actions from other errors and read their status and message:

import { isVoidActionError } from '@void/react';

function describeError(error: unknown) {
  if (isVoidActionError(error)) {
    if (error.status === 401) return 'Please sign in again.';
    return error.message;
  }
  return 'Something went wrong.';
}

Action error handling