Skip to content

Instantly share code, notes, and snippets.

@SalathielGenese
Created May 7, 2018 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SalathielGenese/86a9930b7946b9b61242c9b50f3c370d to your computer and use it in GitHub Desktop.
Save SalathielGenese/86a9930b7946b9b61242c9b50f3c370d to your computer and use it in GitHub Desktop.
npm test output
[nodemon] restarting due to changes...
[nodemon] starting `jasmine JASMINE_CONFIG_PATH=jasmine.json`
Started
.....{ StatusCodeError: 401 - {"status":"Token has expired"}
at new StatusCodeError (/mch-gw/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/mch-gw/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mch-gw/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mch-gw/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 401,
message: '401 - {"status":"Token has expired"}',
error: { status: 'Token has expired' },
options:
{ uri: 'https://users.api.dev.myminecraft.host/users/user',
method: 'GET',
json: true,
resolveWithFullResponse: true,
headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer undefined' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 365,
[Symbol(bytesRead)]: 366 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 365,
[Symbol(bytesRead)]: 366 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.13.9',
date: 'Mon, 07 May 2018 03:53:14 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '30',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
etag: 'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'strict-transport-security': 'max-age=15724800; includeSubDomains;' },
rawHeaders:
[ 'Server',
'nginx/1.13.9',
'Date',
'Mon, 07 May 2018 03:53:14 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'30',
'Connection',
'close',
'X-Powered-By',
'Express',
'Access-Control-Allow-Origin',
'*',
'ETag',
'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'Strict-Transport-Security',
'max-age=15724800; includeSubDomains;' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 401,
statusMessage: 'Unauthorized',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 365,
[Symbol(bytesRead)]: 366 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /users/user HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer undefined\r\nhost: users.api.dev.myminecraft.host\r\naccept: application/json\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/users/user',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Object],
method: 'GET',
resolveWithFullResponse: true,
headers: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'users.api.dev.myminecraft.host',
path: '/users/user',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'https://users.api.dev.myminecraft.host/users/user',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'users.api.dev.myminecraft.host',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: { status: 'Token has expired' } } }
undefined
F{ StatusCodeError: 401 - {"status":"Token has expired"}
at new StatusCodeError (/mch-gw/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/mch-gw/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mch-gw/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mch-gw/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 401,
message: '401 - {"status":"Token has expired"}',
error: { status: 'Token has expired' },
options:
{ uri: 'https://users.api.dev.myminecraft.host/users/user',
method: 'GET',
json: true,
resolveWithFullResponse: true,
headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer undefined' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 435,
[Symbol(bytesRead)]: 366 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 435,
[Symbol(bytesRead)]: 366 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.13.9',
date: 'Mon, 07 May 2018 03:53:15 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '30',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
etag: 'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'strict-transport-security': 'max-age=15724800; includeSubDomains;' },
rawHeaders:
[ 'Server',
'nginx/1.13.9',
'Date',
'Mon, 07 May 2018 03:53:15 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'30',
'Connection',
'close',
'X-Powered-By',
'Express',
'Access-Control-Allow-Origin',
'*',
'ETag',
'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'Strict-Transport-Security',
'max-age=15724800; includeSubDomains;' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 401,
statusMessage: 'Unauthorized',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 435,
[Symbol(bytesRead)]: 366 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /users/user HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer undefined\r\nhost: users.api.dev.myminecraft.host\r\naccept: application/json\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/users/user',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Object],
method: 'GET',
resolveWithFullResponse: true,
headers: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'users.api.dev.myminecraft.host',
path: '/users/user',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'https://users.api.dev.myminecraft.host/users/user',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'users.api.dev.myminecraft.host',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: { status: 'Token has expired' } } }
undefined
F{ StatusCodeError: 401 - {"status":"Token has expired"}
at new StatusCodeError (/mch-gw/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/mch-gw/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mch-gw/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mch-gw/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 401,
message: '401 - {"status":"Token has expired"}',
error: { status: 'Token has expired' },
options:
{ uri: 'https://users.api.dev.myminecraft.host/users/user',
method: 'GET',
json: true,
resolveWithFullResponse: true,
headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer undefined' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 505,
[Symbol(bytesRead)]: 366 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 505,
[Symbol(bytesRead)]: 366 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.13.9',
date: 'Mon, 07 May 2018 03:53:16 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '30',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
etag: 'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'strict-transport-security': 'max-age=15724800; includeSubDomains;' },
rawHeaders:
[ 'Server',
'nginx/1.13.9',
'Date',
'Mon, 07 May 2018 03:53:16 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'30',
'Connection',
'close',
'X-Powered-By',
'Express',
'Access-Control-Allow-Origin',
'*',
'ETag',
'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'Strict-Transport-Security',
'max-age=15724800; includeSubDomains;' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 401,
statusMessage: 'Unauthorized',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 505,
[Symbol(bytesRead)]: 366 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /users/user HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer undefined\r\nhost: users.api.dev.myminecraft.host\r\naccept: application/json\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/users/user',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Object],
method: 'GET',
resolveWithFullResponse: true,
headers: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'users.api.dev.myminecraft.host',
path: '/users/user',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'https://users.api.dev.myminecraft.host/users/user',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'users.api.dev.myminecraft.host',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: { status: 'Token has expired' } } }
undefined
.{ StatusCodeError: 401 - {"status":"Token has expired"}
at new StatusCodeError (/mch-gw/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/mch-gw/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mch-gw/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mch-gw/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 401,
message: '401 - {"status":"Token has expired"}',
error: { status: 'Token has expired' },
options:
{ uri: 'https://users.api.dev.myminecraft.host/users/user',
method: 'GET',
json: true,
resolveWithFullResponse: true,
headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer undefined' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 577,
[Symbol(bytesRead)]: 366 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 577,
[Symbol(bytesRead)]: 366 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.13.9',
date: 'Mon, 07 May 2018 03:53:17 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '30',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
etag: 'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'strict-transport-security': 'max-age=15724800; includeSubDomains;' },
rawHeaders:
[ 'Server',
'nginx/1.13.9',
'Date',
'Mon, 07 May 2018 03:53:17 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'30',
'Connection',
'close',
'X-Powered-By',
'Express',
'Access-Control-Allow-Origin',
'*',
'ETag',
'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'Strict-Transport-Security',
'max-age=15724800; includeSubDomains;' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 401,
statusMessage: 'Unauthorized',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 577,
[Symbol(bytesRead)]: 366 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /users/user HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer undefined\r\nhost: users.api.dev.myminecraft.host\r\naccept: application/json\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/users/user',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Object],
method: 'GET',
resolveWithFullResponse: true,
headers: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'users.api.dev.myminecraft.host',
path: '/users/user',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'https://users.api.dev.myminecraft.host/users/user',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'users.api.dev.myminecraft.host',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: { status: 'Token has expired' } } }
undefined
.{ StatusCodeError: 401 - {"status":"Token has expired"}
at new StatusCodeError (/mch-gw/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/mch-gw/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mch-gw/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mch-gw/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 401,
message: '401 - {"status":"Token has expired"}',
error: { status: 'Token has expired' },
options:
{ uri: 'https://users.api.dev.myminecraft.host/users/user',
method: 'GET',
json: true,
resolveWithFullResponse: true,
headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer undefined' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 679,
[Symbol(bytesRead)]: 366 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 679,
[Symbol(bytesRead)]: 366 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.13.9',
date: 'Mon, 07 May 2018 03:53:19 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '30',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
etag: 'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'strict-transport-security': 'max-age=15724800; includeSubDomains;' },
rawHeaders:
[ 'Server',
'nginx/1.13.9',
'Date',
'Mon, 07 May 2018 03:53:19 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'30',
'Connection',
'close',
'X-Powered-By',
'Express',
'Access-Control-Allow-Origin',
'*',
'ETag',
'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'Strict-Transport-Security',
'max-age=15724800; includeSubDomains;' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 401,
statusMessage: 'Unauthorized',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 679,
[Symbol(bytesRead)]: 366 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /users/user HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer undefined\r\nhost: users.api.dev.myminecraft.host\r\naccept: application/json\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/users/user',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Object],
method: 'GET',
resolveWithFullResponse: true,
headers: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'users.api.dev.myminecraft.host',
path: '/users/user',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'https://users.api.dev.myminecraft.host/users/user',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'users.api.dev.myminecraft.host',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: { status: 'Token has expired' } } }
undefined
F{ StatusCodeError: 401 - {"status":"Token has expired"}
at new StatusCodeError (/mch-gw/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/mch-gw/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/mch-gw/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mch-gw/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mch-gw/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 401,
message: '401 - {"status":"Token has expired"}',
error: { status: 'Token has expired' },
options:
{ uri: 'https://users.api.dev.myminecraft.host/users/user',
method: 'GET',
json: true,
resolveWithFullResponse: true,
headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer undefined' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 749,
[Symbol(bytesRead)]: 366 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 749,
[Symbol(bytesRead)]: 366 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ server: 'nginx/1.13.9',
date: 'Mon, 07 May 2018 03:53:20 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '30',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
etag: 'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'strict-transport-security': 'max-age=15724800; includeSubDomains;' },
rawHeaders:
[ 'Server',
'nginx/1.13.9',
'Date',
'Mon, 07 May 2018 03:53:20 GMT',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'30',
'Connection',
'close',
'X-Powered-By',
'Express',
'Access-Control-Allow-Origin',
'*',
'ETag',
'W/"1e-TZjalr96GiWLxkiKdVchPpEDQNU"',
'Strict-Transport-Security',
'max-age=15724800; includeSubDomains;' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 401,
statusMessage: 'Unauthorized',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'users.api.dev.myminecraft.host',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 176,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 749,
[Symbol(bytesRead)]: 366 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /users/user HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer undefined\r\nhost: users.api.dev.myminecraft.host\r\naccept: application/json\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/users/user',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
uri: [Object],
method: 'GET',
resolveWithFullResponse: true,
headers: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'users.api.dev.myminecraft.host',
path: '/users/user',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'https://users.api.dev.myminecraft.host/users/user',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'users.api.dev.myminecraft.host',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: { status: 'Token has expired' } } }
undefined
F
Failures:
1) user can access when logged in - GET /user/current [1/2]
Message:
Error: expected 200 "OK", got 401 "Unauthorized"
Stack:
Error: expected 200 "OK", got 401 "Unauthorized"
at Test._assertStatus (/mch-gw/node_modules/supertest/lib/test.js:266:12)
at Test._assertFunction (/mch-gw/node_modules/supertest/lib/test.js:281:11)
at Test.assert (/mch-gw/node_modules/supertest/lib/test.js:171:18)
at Server.assert (/mch-gw/node_modules/supertest/lib/test.js:131:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Server.emit (events.js:208:7)
at emitCloseNT (net.js:1671:8)
at _combinedTickCallback (internal/process/next_tick.js:135:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2) user have SESSION_ID unset at logout - GET /user/logout [1/2]
Message:
Error: expected 200 "OK", got 401 "Unauthorized"
Stack:
Error: expected 200 "OK", got 401 "Unauthorized"
at Test._assertStatus (/mch-gw/node_modules/supertest/lib/test.js:266:12)
at Test._assertFunction (/mch-gw/node_modules/supertest/lib/test.js:281:11)
at Test.assert (/mch-gw/node_modules/supertest/lib/test.js:171:18)
at Server.assert (/mch-gw/node_modules/supertest/lib/test.js:131:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Server.emit (events.js:208:7)
at emitCloseNT (net.js:1671:8)
at _combinedTickCallback (internal/process/next_tick.js:135:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
3) user can access when logged in - GET /user/current [2/2]
Message:
Error: expected 200 "OK", got 401 "Unauthorized"
Stack:
Error: expected 200 "OK", got 401 "Unauthorized"
at Test._assertStatus (/mch-gw/node_modules/supertest/lib/test.js:266:12)
at Test._assertFunction (/mch-gw/node_modules/supertest/lib/test.js:281:11)
at Test.assert (/mch-gw/node_modules/supertest/lib/test.js:171:18)
at Server.assert (/mch-gw/node_modules/supertest/lib/test.js:131:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Server.emit (events.js:208:7)
at emitCloseNT (net.js:1671:8)
at _combinedTickCallback (internal/process/next_tick.js:135:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
4) user have SESSION_ID unset at logout - GET /user/logout [2/2]
Message:
Error: expected 200 "OK", got 401 "Unauthorized"
Stack:
Error: expected 200 "OK", got 401 "Unauthorized"
at Test._assertStatus (/mch-gw/node_modules/supertest/lib/test.js:266:12)
at Test._assertFunction (/mch-gw/node_modules/supertest/lib/test.js:281:11)
at Test.assert (/mch-gw/node_modules/supertest/lib/test.js:171:18)
at Server.assert (/mch-gw/node_modules/supertest/lib/test.js:131:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Server.emit (events.js:208:7)
at emitCloseNT (net.js:1671:8)
at _combinedTickCallback (internal/process/next_tick.js:135:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
11 specs, 4 failures
Finished in 11.506 seconds
[nodemon] app crashed - waiting for file changes before starting...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment