
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@prisma-next/sql-errors
Advanced tools
SQL-normalized driver error types for Prisma Next.
This package provides normalized error classes for SQL driver errors. These errors are shared across both migration-plane and runtime-plane code, allowing consistent error handling regardless of which driver is being used.
Normalize driver-specific errors (e.g., Postgres pg errors) into well-typed, SQL-family error classes that can be handled deterministically by migration runners, CLI commands, and other downstream systems.
SqlQueryError and SqlConnectionError classes.is() methods for safe error checking without instanceofError.causeRepresents query-related failures:
Fields:
kind: 'sql_query' (discriminator)sqlState: Postgres SQLSTATE code (e.g., '23505')constraint: Constraint name if applicabletable: Table name if applicablecolumn: Column name if applicabledetail: Additional detail from databaseRepresents connection-related failures:
Fields:
kind: 'sql_connection' (discriminator)transient: Whether retry might succeedimport { SqlQueryError, SqlConnectionError } from '@prisma-next/sql-errors';
// Check error type using type predicate (recommended)
if (SqlQueryError.is(error)) {
console.log('SQLSTATE:', error.sqlState);
console.log('Constraint:', error.constraint);
console.log('Original stack:', error.cause?.stack);
}
// Create normalized error with original error preserved
const normalized = new SqlQueryError('Query failed', {
cause: originalError,
sqlState: '23505',
constraint: 'user_email_unique',
});
This package is in the shared plane, meaning it can be imported by both migration-plane and runtime-plane packages. This allows drivers (runtime plane) and migration runners (migration plane) to use the same error types.
docs/architecture docs/subsystems/5. Adapters & Targets.md: Driver architecturedocs/Error Handling.md: Error handling patternsFAQs
Normalized SQL driver error types for Prisma Next
The npm package @prisma-next/sql-errors receives a total of 11,789 weekly downloads. As such, @prisma-next/sql-errors popularity was classified as popular.
We found that @prisma-next/sql-errors demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.