File size: 295 Bytes
b91e262
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
export class NetworkError extends Error {
  constructor(message: string, options?: { cause?: unknown }) {
    super(message)
    this.name = 'NetworkError'
    // Preserve error cause when supported
    if (options && 'cause' in options) {
      ;(this as any).cause = options.cause
    }
  }
}