Skip to content

v0.21.0

Pre-release
Pre-release

Choose a tag to compare

@iamceeso iamceeso released this 14 Aug 11:20
· 109 commits to main since this release

This release introduces a first-class error handling system across Verikit, with centralized server-side error processing, stable error codes, structured client errors, and improved React error handling. It also includes several fixes to optimistic updates, forms, relationship pickers, filtering, and table behaviour.

Highlights

First-class error handling

Verikit now provides a dedicated error hierarchy with stable error codes, making errors more predictable and easier to handle across the stack.

  • Added the VerikitError hierarchy with stable error codes.
  • Added centralized server error handling through the new onError hook.
  • Added standardized error-response formatting.
  • Refactored server handlers to throw VerikitError instances instead of manually constructing error responses.
  • HTTP parsing errors now flow through the same error system.
  • Added structured client-side error handling for React applications.
  • Added comprehensive tests covering error behaviour and error-code contracts.

This establishes a consistent error path from the server through to client applications and provides a stronger foundation for applications that need to react programmatically to specific failures.

React error handling improvements

React components now make better use of structured errors returned by the server.

In particular, server-side unique constraint errors can now be surfaced directly on the appropriate ResourceForm fields, providing users with useful validation feedback instead of generic request failures.

Relationship picker failures are also surfaced correctly rather than being silently lost.

Safer optimistic updates

Fixed race conditions involving optimistic cache updates and rollbacks.

Bulk-delete failures could previously cause a rollback to restore sibling rows that had already been successfully removed by another operation. Rollback behaviour has been corrected to prevent deleted records from being unintentionally resurrected.

Additional tests have been added specifically around optimistic-cache rollback races.

ResourceTable improvements

Several table and filtering behaviours have been improved:

  • Changing a filter or search query now resets the table to the first page.
  • Date filtering and filter-clearing behaviour have been improved.
  • Relationship pickers request the complete required result set.
  • Relationship picker errors are now surfaced correctly.
  • Bulk-delete confirmation titles no longer incorrectly double-pluralize resource names.

Testing

This release expands test coverage around the new error architecture and React state-management behaviour, including:

  • Error hierarchy and stable error-code contracts.
  • Centralized server error handling.
  • Structured client errors.
  • Optimistic cache rollback race conditions.
  • Bulk-delete rollback behaviour.

These tests are intended to make both the public error contract and optimistic-update behaviour safer to evolve in future releases.

Summary

v0.21.0 primarily strengthens reliability and error handling across Verikit's core, server, and React packages. Applications now have a more consistent way to identify, transport, display, and customize errors, while the accompanying React fixes improve behaviour around forms, tables, relationships, and concurrent optimistic updates.

Full Changelog: v0.20.0...v0.21.0