diff --git a/api.js b/api.js index 3ee7694d..e65ec6cd 100644 --- a/api.js +++ b/api.js @@ -67,7 +67,7 @@ const serverOptions = { _api_response: body.success ? 'success' : 'fail', _error: body.error, - _error_code: body.code, + _code: body.code, _size: size }; diff --git a/imap-core/lib/commands/append.js b/imap-core/lib/commands/append.js index 659c3283..352950f3 100644 --- a/imap-core/lib/commands/append.js +++ b/imap-core/lib/commands/append.js @@ -119,7 +119,7 @@ module.exports = { if (err) { logdata._error = err.message; - logdata._error_code = err.code; + logdata._code = err.code; logdata._response = err.response; this._server.loggelf(logdata); return callback(err); diff --git a/imap-core/lib/commands/fetch.js b/imap-core/lib/commands/fetch.js index 97de16b4..d0a98ea7 100644 --- a/imap-core/lib/commands/fetch.js +++ b/imap-core/lib/commands/fetch.js @@ -272,7 +272,7 @@ module.exports = { if (err) { logdata._error = err.message; - logdata._error_code = err.code; + logdata._code = err.code; logdata._response = err.response; this._server.loggelf(logdata); return callback(err); diff --git a/lib/user-handler.js b/lib/user-handler.js index da00be5f..82cfa99b 100644 --- a/lib/user-handler.js +++ b/lib/user-handler.js @@ -393,7 +393,7 @@ class UserHandler { short_message: '[AUTHFAIL] ' + username, full_message: err.stack, _error: err.message, - _error_code: err.code, + _code: err.code, _auth_result: 'error', _username: username, _domain: userDomain, @@ -458,7 +458,7 @@ class UserHandler { short_message: '[AUTHFAIL] ' + username, full_message: err.stack, _error: err.message, - _error_code: err.code, + _code: err.code, _auth_result: 'error', _username: username, _domain: userDomain, @@ -478,7 +478,7 @@ class UserHandler { short_message: '[AUTHFAIL] ' + username, full_message: err.stack, _error: err.message, - _error_code: err.code, + _code: err.code, _auth_result: 'error', _username: username, _domain: userDomain, @@ -525,7 +525,7 @@ class UserHandler { short_message: '[AUTHFAIL] ' + username, full_message: err.stack, _error: err.message, - _error_code: err.code, + _code: err.code, _auth_result: 'error', _username: username, _domain: userDomain, @@ -600,7 +600,7 @@ class UserHandler { short_message: '[AUTHFAIL] ' + username, full_message: err.stack, _error: err.message || 'Authentication failed', - _error_code: err.code, + _code: err.code, _auth_result: 'fail', _username: username, _domain: userDomain,