mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-02-09 13:35:28 +07:00
node_modules: update (#259)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
61
node_modules/nodemailer/lib/errors.js
generated
vendored
Normal file
61
node_modules/nodemailer/lib/errors.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Nodemailer Error Codes
|
||||
*
|
||||
* Centralized error code definitions for consistent error handling.
|
||||
*
|
||||
* Usage:
|
||||
* const errors = require('./errors');
|
||||
* let err = new Error('Connection closed');
|
||||
* err.code = errors.ECONNECTION;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Error code descriptions for documentation and debugging
|
||||
*/
|
||||
const ERROR_CODES = {
|
||||
// Connection errors
|
||||
ECONNECTION: 'Connection closed unexpectedly',
|
||||
ETIMEDOUT: 'Connection or operation timed out',
|
||||
ESOCKET: 'Socket-level error',
|
||||
EDNS: 'DNS resolution failed',
|
||||
|
||||
// TLS/Security errors
|
||||
ETLS: 'TLS handshake or STARTTLS failed',
|
||||
EREQUIRETLS: 'REQUIRETLS not supported by server (RFC 8689)',
|
||||
|
||||
// Protocol errors
|
||||
EPROTOCOL: 'Invalid SMTP server response',
|
||||
EENVELOPE: 'Invalid mail envelope (sender or recipients)',
|
||||
EMESSAGE: 'Message delivery error',
|
||||
ESTREAM: 'Stream processing error',
|
||||
|
||||
// Authentication errors
|
||||
EAUTH: 'Authentication failed',
|
||||
ENOAUTH: 'Authentication credentials not provided',
|
||||
EOAUTH2: 'OAuth2 token generation or refresh error',
|
||||
|
||||
// Resource errors
|
||||
EMAXLIMIT: 'Pool resource limit reached (max messages per connection)',
|
||||
|
||||
// Transport-specific errors
|
||||
ESENDMAIL: 'Sendmail command error',
|
||||
ESES: 'AWS SES transport error',
|
||||
|
||||
// Configuration and access errors
|
||||
ECONFIG: 'Invalid configuration',
|
||||
EPROXY: 'Proxy connection error',
|
||||
EFILEACCESS: 'File access rejected (disableFileAccess is set)',
|
||||
EURLACCESS: 'URL access rejected (disableUrlAccess is set)',
|
||||
EFETCH: 'HTTP fetch error'
|
||||
};
|
||||
|
||||
// Export error codes as string constants and the full definitions object
|
||||
module.exports = Object.keys(ERROR_CODES).reduce(
|
||||
(exports, code) => {
|
||||
exports[code] = code;
|
||||
return exports;
|
||||
},
|
||||
{ ERROR_CODES }
|
||||
);
|
||||
Reference in New Issue
Block a user