mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
28 lines
659 B
TypeScript
28 lines
659 B
TypeScript
export abstract class ImapError extends Error {}
|
|
|
|
/** Error thrown when a connection attempt has timed out */
|
|
export class ConnectionTimeoutError extends ImapError {
|
|
constructor(
|
|
/** timeout in milliseconds that the connection waited before timing out */
|
|
readonly timeout?: number,
|
|
) {
|
|
let message = 'connection timed out';
|
|
if (timeout) {
|
|
message += `. timeout = ${timeout} ms`;
|
|
}
|
|
super(message);
|
|
}
|
|
}
|
|
|
|
export class ConnectionClosedError extends ImapError {
|
|
constructor() {
|
|
super('Connection closed unexpectedly');
|
|
}
|
|
}
|
|
|
|
export class ConnectionEndedError extends ImapError {
|
|
constructor() {
|
|
super('Connection ended unexpectedly');
|
|
}
|
|
}
|