New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@megaorm/errors

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@megaorm/errors

This package provides custom error classes for handling transaction, connection, and queue management issues in MegaORM.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

MegaORM Errors

This package provides custom error classes for handling transaction, connection, and queue management issues in MegaORM, providing a consistent way to report failures.

Installation

To install the @megaorm/errors package, run the following command:

npm install @megaorm/errors

Errors

This package defines the following error classes:

new BeginTransactionError(message?: string)

Represents an error that occurs when starting a database transaction.

new CommitTransactionError(message?: string)

Represents an error that occurs when committing a database transaction.

new RollbackTransactionError(message?: string)

Represents an error that occurs when rolling back a database transaction.

new CloseConnectionError(message?: string)

Represents an error that occurs when closing a database connection.

new CreateConnectionError(message?: string)

Represents an error that occurs when creating a database connection.

new MaxConnectionError(message?: string)

Represents an error when the maximum number of database connections is exceeded.

new MaxQueueSizeError(message?: string)

Represents an error when the maximum queue size is exceeded.

new MaxQueueTimeError(message?: string)

Represents an error when the maximum allowed queue time is exceeded.

new QueryError(message?: string)

Represents an error that occurs during query execution.

new ShutdownError(message?: string)

Represents an error that occurs during shutdown.

Default Error Messages

Each error class has a default message that is used if no custom message is provided. Below are the default messages for each error:

  • BeginTransactionError: 'Begin transaction failed'
  • CommitTransactionError: 'Commit transaction failed'
  • RollbackTransactionError: 'Rollback transaction failed'
  • CloseConnectionError: 'Close connection failed'
  • CreateConnectionError: 'Create connection failed'
  • MaxConnectionError: 'Max number of connections passed'
  • MaxQueueSizeError: 'Max queue size passed'
  • MaxQueueTimeError: 'Max queue time passed'
  • QueryError: 'Query execution failed'
  • ShutdownError: 'Shutdown failed'

Keywords

megaorm

FAQs

Package last updated on 20 Dec 2024

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