
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
@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 12,879 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 Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.