🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@prisma-next/errors

Package Overview
Dependencies
Maintainers
3
Versions
404
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma-next/errors

Structured error types for Prisma Next control and execution planes

Source
npmnpm
Version
0.13.0-dev.31
Version published
Weekly downloads
19K
14.45%
Maintainers
3
Weekly downloads
 
Created
Source

@prisma-next/errors

Internal package. This package is an implementation detail of prisma-next and is published only to support its runtime. Its API is unstable and may change without notice. Do not depend on this package directly; install prisma-next instead.

Structured error types and factories for CLI and runtime error reporting.

Overview

This package provides CliStructuredError (the shared error class) and factory functions for creating structured errors with error codes, fix suggestions, and machine-readable metadata. Errors are split across two entry points by domain:

  • ./control — CLI errors (PN-CLI-4xxx): config validation, file resolution, migration planning
  • ./execution — Runtime errors (PN-RUN-3xxx): contract verification, hash mismatch, database signing

Usage

import { CliStructuredError, errorConfigFileNotFound } from '@prisma-next/errors/control';
import { errorHashMismatch } from '@prisma-next/errors/execution';

// Create a CLI error
throw errorConfigFileNotFound('/path/to/config.ts');

// Create a runtime error
throw errorHashMismatch({ expected: 'abc123', actual: 'def456' });

// Type-guard check
if (CliStructuredError.is(caught)) {
  const envelope = caught.toEnvelope();
  // { ok: false, code: 'PN-CLI-4001', domain: 'CLI', summary: '...', ... }
}

Entry points

Entry pointDomainCode rangeContents
./controlCLIPN-CLI-4xxxCliStructuredError class, CliErrorEnvelope/CliErrorConflict types, 14 CLI factory functions, errorUnexpected
./executionRUNPN-RUN-3xxx8 runtime factory functions, ERROR_CODE_DESTRUCTIVE_CHANGES constant

FAQs

Package last updated on 15 Jun 2026

Did you know?

Socket

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.

Install

Related posts