Skip to content

Improve error handling, documentation, and failure-path test coverage#14

Merged
tobiemh merged 3 commits intomainfrom
tobiemh/improve-errors
Feb 14, 2026
Merged

Improve error handling, documentation, and failure-path test coverage#14
tobiemh merged 3 commits intomainfrom
tobiemh/improve-errors

Conversation

@tobiemh
Copy link
Copy Markdown
Member

@tobiemh tobiemh commented Feb 14, 2026

Summary

  • Standardise all error throws to use custom OrmError and TypeParseError classes instead of generic Error, and export both from the public API so consumers can catch ORM-specific errors distinctly.
  • Add @throws JSDoc tags to every method and function that can throw, across query builders, schema, type classes, and utility modules.

Replace all generic `Error` throws with `OrmError` or `TypeParseError` across the codebase, and export both error classes from the public API so consumers can catch ORM-specific errors distinctly.
Document which error class each method can throw so consumers can discover the error contract without reading source code.
Cover untested error scenarios: InsertQuery builder validation (fields/values conflicts, row mismatch, ignore/onDuplicate conflicts), transaction rollback on callback errors, and batch error propagation.
@tobiemh tobiemh merged commit 3b0d135 into main Feb 14, 2026
11 checks passed
@tobiemh tobiemh deleted the tobiemh/improve-errors branch February 14, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant