
Product
Introducing Manifest Alerts
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.
@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 13,639 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.

Product
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.