Skip to main content

Built and signed on GitHub Actions

Works with
This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
•JSR Score100%•
License
Apache-2.0
•
Downloads296/wk
•
Publisheda day ago (0.0.10)

A provider-agnostic message queue for NetScript: enqueue and drain background jobs through one MessageQueue contract, auto-discovering a RabbitMQ, Redis, or Deno KV backend from the Aspire environment.

Queue Error Types

Standardized error handling for queue operations.

Classes

c
QueueConfigurationError(
message: string,
context?: Record<string, unknown>
)

Error thrown when queue configuration is invalid.

c
QueueConnectionError(
message: string,
cause?: Error
)

Error thrown when queue connection fails.

c
QueueError(
message: string,
code: QueueErrorCode,
options?: { cause?: Error; context?: Record<string, unknown>; }
)

Base error class for all queue operations.

  • cause: Error

    Original error that caused this error (if any).

  • code: QueueErrorCode

    Error code for programmatic error handling.

  • context: Record<string, unknown>

    Additional context about the error.

  • toJSON(): Record<string, unknown>

    Convert error to JSON for logging/serialization.

c
QueueHandlerError(
message: string,
cause?: Error,
context?: Record<string, unknown>
)

Error thrown when message handler fails.

c
QueueReceiptRetainedError(
message: string,
cause?: unknown,
context?: Record<string, unknown>
)

Error thrown by a handler when delivery settlement cannot be persisted and the queue adapter must retain the native receipt without acknowledging the message or issuing a counted requeue.

  • retainReceipt: boolean

    Marker inspected by queue adapters to retain the receipt without counted requeue.

c
QueueValidationError(
message: string,
context?: Record<string, unknown>
)

Error thrown when message validation fails.

Enums

E

Error codes for queue operations.

Functions

f
isQueueReceiptRetainedError(error: unknown): error is QueueReceiptRetainedError

Return whether an error instructs queue adapters to retain the native receipt without acknowledging the delivery or issuing a counted requeue.

Add Package

deno add jsr:@netscript/queue

Import symbol

import * as mod from "@netscript/queue/errors";
or

Import directly with a jsr specifier

import * as mod from "jsr:@netscript/queue@^0.0.10/errors";