Skip to content
Source
Sign inSign up
samwillis/neon-durable-streams
Open History to see the last commit

errors.ts

19 lines501 Bytes

1/** A protocol failure whose public message must not contain infrastructure secrets. */
2export class StreamError extends Error {
3 constructor(
4 readonly status: number,
5 readonly code: string,
6 message: string,
7 readonly headers: Readonly<Record<string, string>> = {},
8 ) {
9 super(message)
10 this.name = 'StreamError'
11 }
13​
14export class StorageCompatibilityError extends Error {
15 constructor(message: string) {
16 super(message)
17 this.name = 'StorageCompatibilityError'
18 }