mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2025-12-19 05:47:46 +00:00
999 lines
188 KiB
Plaintext
999 lines
188 KiB
Plaintext
|
|
> jambones-api-server@1.0.0 test /Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server
|
|
> NODE_ENV=test node test/ | ./node_modules/.bin/tap-spec
|
|
|
|
|
|
creating jambones_test database
|
|
|
|
✔ database successfully created
|
|
|
|
creating schema
|
|
|
|
✔ schema successfully created
|
|
|
|
creating auth token
|
|
|
|
✔ auth token successfully created
|
|
|
|
service provider tests
|
|
|
|
✔ fails with 401 if Bearer token not supplied
|
|
{"level":50, "time": "2019-12-05T14:33:46.000Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"Error querying for api key","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Handshake.onConnect (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:64:7)\n at Handshake.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Handshake._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Handshake.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Handshake.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{"level":50, "time": "2019-12-05T14:33:46.002Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"burped error","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Handshake.onConnect (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:64:7)\n at Handshake.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Handshake._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Handshake.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Handshake.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
name: 'StatusCodeError',
|
|
statusCode: 500,
|
|
message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}',
|
|
error: { msg: 'ER_NO_DB_ERROR: No database selected' },
|
|
options:
|
|
{ baseUrl: 'http://127.0.0.1:3000/v1',
|
|
resolveWithFullResponse: true,
|
|
auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' },
|
|
json: true,
|
|
body: { name: 'daveh' },
|
|
uri: '/ServiceProviders',
|
|
method: 'POST',
|
|
callback: [Function: RP$callback],
|
|
transform: undefined,
|
|
simple: true,
|
|
transform2xxOnly: false },
|
|
response:
|
|
IncomingMessage {
|
|
_readableState:
|
|
ReadableState {
|
|
objectMode: false,
|
|
highWaterMark: 16384,
|
|
buffer: BufferList { head: null, tail: null, length: 0 },
|
|
length: 0,
|
|
pipes: null,
|
|
pipesCount: 0,
|
|
flowing: true,
|
|
ended: true,
|
|
endEmitted: true,
|
|
reading: false,
|
|
sync: true,
|
|
needReadable: false,
|
|
emittedReadable: false,
|
|
readableListening: false,
|
|
resumeScheduled: false,
|
|
paused: false,
|
|
emitClose: true,
|
|
destroyed: false,
|
|
defaultEncoding: 'utf8',
|
|
awaitDrain: 0,
|
|
readingMore: true,
|
|
decoder: null,
|
|
encoding: null },
|
|
readable: false,
|
|
_events:
|
|
[Object: null prototype] {
|
|
end: [Array],
|
|
close: [Array],
|
|
data: [Function],
|
|
error: [Function] },
|
|
_eventsCount: 4,
|
|
_maxListeners: undefined,
|
|
socket:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 109,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
connection:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 109,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
httpVersionMajor: 1,
|
|
httpVersionMinor: 1,
|
|
httpVersion: '1.1',
|
|
complete: true,
|
|
headers:
|
|
{ 'x-powered-by': 'Express',
|
|
'content-type': 'application/json; charset=utf-8',
|
|
'content-length': '46',
|
|
etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"',
|
|
date: 'Thu, 05 Dec 2019 14:33:45 GMT',
|
|
connection: 'close' },
|
|
rawHeaders:
|
|
[ 'X-Powered-By',
|
|
'Express',
|
|
'Content-Type',
|
|
'application/json; charset=utf-8',
|
|
'Content-Length',
|
|
'46',
|
|
'ETag',
|
|
'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"',
|
|
'Date',
|
|
'Thu, 05 Dec 2019 14:33:45 GMT',
|
|
'Connection',
|
|
'close' ],
|
|
trailers: {},
|
|
rawTrailers: [],
|
|
aborted: false,
|
|
upgrade: false,
|
|
url: '',
|
|
method: null,
|
|
statusCode: 500,
|
|
statusMessage: 'Internal Server Error',
|
|
client:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 109,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
_consuming: false,
|
|
_dumped: false,
|
|
req:
|
|
ClientRequest {
|
|
_events: [Object],
|
|
_eventsCount: 5,
|
|
_maxListeners: undefined,
|
|
output: [],
|
|
outputEncodings: [],
|
|
outputCallbacks: [],
|
|
outputSize: 0,
|
|
writable: true,
|
|
_last: true,
|
|
chunkedEncoding: false,
|
|
shouldKeepAlive: false,
|
|
useChunkedEncodingByDefault: true,
|
|
sendDate: false,
|
|
_removedConnection: false,
|
|
_removedContLen: false,
|
|
_removedTE: false,
|
|
_contentLength: null,
|
|
_hasBody: true,
|
|
_trailer: '',
|
|
finished: true,
|
|
_headerSent: true,
|
|
socket: [Socket],
|
|
connection: [Socket],
|
|
_header:
|
|
'POST /v1/ServiceProviders HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n',
|
|
_onPendingData: [Function: noopPendingOutput],
|
|
agent: [Agent],
|
|
socketPath: undefined,
|
|
timeout: undefined,
|
|
method: 'POST',
|
|
path: '/v1/ServiceProviders',
|
|
_ended: true,
|
|
res: [Circular],
|
|
aborted: undefined,
|
|
timeoutCb: null,
|
|
upgradeOrConnect: false,
|
|
parser: null,
|
|
maxHeadersCount: null,
|
|
[Symbol(isCorked)]: false,
|
|
[Symbol(outHeadersKey)]: [Object] },
|
|
request:
|
|
Request {
|
|
_events: [Object],
|
|
_eventsCount: 5,
|
|
_maxListeners: undefined,
|
|
resolveWithFullResponse: true,
|
|
body: '{"name":"daveh"}',
|
|
uri: [Url],
|
|
method: 'POST',
|
|
readable: true,
|
|
writable: true,
|
|
explicitMethod: true,
|
|
_qs: [Querystring],
|
|
_auth: [Auth],
|
|
_oauth: [OAuth],
|
|
_multipart: [Multipart],
|
|
_redirect: [Redirect],
|
|
_tunnel: [Tunnel],
|
|
_rp_resolve: [Function],
|
|
_rp_reject: [Function],
|
|
_rp_promise: [Promise],
|
|
_rp_callbackOrig: undefined,
|
|
callback: [Function],
|
|
_rp_options: [Object],
|
|
headers: [Object],
|
|
setHeader: [Function],
|
|
hasHeader: [Function],
|
|
getHeader: [Function],
|
|
removeHeader: [Function],
|
|
localAddress: undefined,
|
|
pool: {},
|
|
dests: [],
|
|
__isRequestRequest: true,
|
|
_callback: [Function: RP$callback],
|
|
proxy: null,
|
|
tunnel: false,
|
|
setHost: true,
|
|
originalCookieHeader: undefined,
|
|
_disableCookies: true,
|
|
_jar: undefined,
|
|
port: '3000',
|
|
host: '127.0.0.1',
|
|
path: '/v1/ServiceProviders',
|
|
_json: true,
|
|
httpModule: [Object],
|
|
agentClass: [Function],
|
|
agent: [Agent],
|
|
_started: true,
|
|
href: 'http://127.0.0.1:3000/v1/ServiceProviders',
|
|
req: [ClientRequest],
|
|
ntick: true,
|
|
response: [Circular],
|
|
originalHost: '127.0.0.1:3000',
|
|
originalHostHeaderName: 'host',
|
|
responseContent: [Circular],
|
|
_destdata: true,
|
|
_ended: true,
|
|
_callbackCalled: true },
|
|
toJSON: [Function: responseToJSON],
|
|
caseless: Caseless { dict: [Object] },
|
|
body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
|
|
✖ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
------------------------------------------------------------------------
|
|
operator: error
|
|
expected: |-
|
|
undefined
|
|
actual: |-
|
|
{ name: 'StatusCodeError', statusCode: 500, message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}', error: { msg: 'ER_NO_DB_ERROR: No database selected' }, options: { baseUrl: 'http://127.0.0.1:3000/v1', resolveWithFullResponse: true, auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/ServiceProviders', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, transform2xxOnly: false }, response: { _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: { end: [ [Function: responseOnEnd], [Function] ], close: [ [Function], [Function] ], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/ServiceProviders HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/ServiceProviders', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/ServiceProviders HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/ServiceProviders', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:45 GMT', connection: 'close' }, rawHeaders: [ 'X-Powered-By', 'Express', 'Content-Type', 'application/json; charset=utf-8', 'Content-Length', '46', 'ETag', 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', 'Date', 'Thu, 05 Dec 2019 14:33:45 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 500, statusMessage: 'Internal Server Error', client: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/ServiceProviders HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/ServiceProviders', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, _consuming: false, _dumped: false, req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, _header: 'POST /v1/ServiceProviders HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/ServiceProviders', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, request: { _events: { error: [Function: bound ], complete: [Function: bound ], pipe: [Function], data: [Function], end: [Function] }, _eventsCount: 5, _maxListeners: undefined, resolveWithFullResponse: true, body: '{"name":"daveh"}', uri: { protocol: 'http:', slashes: true, auth: null, host: '127.0.0.1:3000', port: '3000', hostname: '127.0.0.1', hash: null, search: null, query: null, pathname: '/v1/ServiceProviders', path: '/v1/ServiceProviders', href: 'http://127.0.0.1:3000/v1/ServiceProviders' }, method: 'POST', readable: true, writable: true, explicitMethod: true, _qs: { request: [Circular], lib: { formats: [Object], parse: [Function], stringify: [Function] }, useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: { request: [Circular], hasAuth: true, sentAuth: true, bearerToken: '38700987-c7a4-4685-a5bb-af378f9734de', user: null, pass: null }, _oauth: { request: [Circular], params: null }, _multipart: { request: [Circular], boundary: '6f3aeb4b-5874-4dd4-adba-e1cf57f1bf2b', chunked: false, body: null }, _redirect: { request: [Circular], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: { request: [Circular], proxyHeaderWhiteList: [ 'accept', 'accept-charset', 'accept-encoding', 'accept-language', 'accept-ranges', 'cache-control', 'content-encoding', 'content-language', 'content-location', 'content-md5', 'content-range', 'content-type', 'connection', 'date', 'expect', 'max-forwards', 'pragma', 'referer', 'te', 'user-agent', 'via' ], proxyHeaderExclusiveList: [] }, _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: {}, _rp_callbackOrig: undefined, callback: [Function], _rp_options: { baseUrl: 'http://127.0.0.1:3000/v1', resolveWithFullResponse: true, auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/ServiceProviders', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, transform2xxOnly: false }, headers: { authorization: 'Bearer 38700987-c7a4-4685-a5bb-af378f9734de', accept: 'application/json', 'content-type': 'application/json', 'content-length': 16 }, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '3000', host: '127.0.0.1', path: '/v1/ServiceProviders', _json: true, httpModule: { _connectionListener: [Function: connectionListener], METHODS: [ 'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE', 'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE' ], STATUS_CODES: { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 208: 'Already Reported', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 307: 'Temporary Redirect', 308: 'Permanent Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Payload Too Large', 414: 'URI Too Long', 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', 418: 'I\'m a Teapot', 421: 'Misdirected Request', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 425: 'Unordered Collection', 426: 'Upgrade Required', 428: 'Precondition Required', 429: 'Too Many Requests', 431: 'Request Header Fields Too Large', 451: 'Unavailable For Legal Reasons', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 508: 'Loop Detected', 509: 'Bandwidth Limit Exceeded', 510: 'Not Extended', 511: 'Network Authentication Required' }, Agent: [Function: Agent], ClientRequest: [Function: ClientRequest], globalAgent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], get: [Function: get], request: [Function: request], maxHeaderSize: 8192 }, agentClass: [Function: Agent], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, _started: true, href: 'http://127.0.0.1:3000/v1/ServiceProviders', req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, connection: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, _header: 'POST /v1/ServiceProviders HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/ServiceProviders', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, ntick: true, response: [Circular], originalHost: '127.0.0.1:3000', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: { dict: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:45 GMT', connection: 'close' } }, body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
at: Test.test (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/test/service-providers.js:76:7)
|
|
stack: |-
|
|
StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
|
|
|
|
voip carrier tests
|
|
|
|
{"level":50, "time": "2019-12-05T14:33:46.032Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"Error querying for api key","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{"level":50, "time": "2019-12-05T14:33:46.032Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"burped error","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
name: 'StatusCodeError',
|
|
statusCode: 500,
|
|
message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}',
|
|
error: { msg: 'ER_NO_DB_ERROR: No database selected' },
|
|
options:
|
|
{ baseUrl: 'http://127.0.0.1:3000/v1',
|
|
resolveWithFullResponse: true,
|
|
auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' },
|
|
json: true,
|
|
body: { name: 'daveh' },
|
|
uri: '/VoipCarriers',
|
|
method: 'POST',
|
|
callback: [Function: RP$callback],
|
|
transform: undefined,
|
|
simple: true,
|
|
transform2xxOnly: false },
|
|
response:
|
|
IncomingMessage {
|
|
_readableState:
|
|
ReadableState {
|
|
objectMode: false,
|
|
highWaterMark: 16384,
|
|
buffer: BufferList { head: null, tail: null, length: 0 },
|
|
length: 0,
|
|
pipes: null,
|
|
pipesCount: 0,
|
|
flowing: true,
|
|
ended: true,
|
|
endEmitted: true,
|
|
reading: false,
|
|
sync: true,
|
|
needReadable: false,
|
|
emittedReadable: false,
|
|
readableListening: false,
|
|
resumeScheduled: false,
|
|
paused: false,
|
|
emitClose: true,
|
|
destroyed: false,
|
|
defaultEncoding: 'utf8',
|
|
awaitDrain: 0,
|
|
readingMore: true,
|
|
decoder: null,
|
|
encoding: null },
|
|
readable: false,
|
|
_events:
|
|
[Object: null prototype] {
|
|
end: [Array],
|
|
close: [Array],
|
|
data: [Function],
|
|
error: [Function] },
|
|
_eventsCount: 4,
|
|
_maxListeners: undefined,
|
|
socket:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 180,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
connection:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 180,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
httpVersionMajor: 1,
|
|
httpVersionMinor: 1,
|
|
httpVersion: '1.1',
|
|
complete: true,
|
|
headers:
|
|
{ 'x-powered-by': 'Express',
|
|
'content-type': 'application/json; charset=utf-8',
|
|
'content-length': '46',
|
|
etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"',
|
|
date: 'Thu, 05 Dec 2019 14:33:46 GMT',
|
|
connection: 'close' },
|
|
rawHeaders:
|
|
[ 'X-Powered-By',
|
|
'Express',
|
|
'Content-Type',
|
|
'application/json; charset=utf-8',
|
|
'Content-Length',
|
|
'46',
|
|
'ETag',
|
|
'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"',
|
|
'Date',
|
|
'Thu, 05 Dec 2019 14:33:46 GMT',
|
|
'Connection',
|
|
'close' ],
|
|
trailers: {},
|
|
rawTrailers: [],
|
|
aborted: false,
|
|
upgrade: false,
|
|
url: '',
|
|
method: null,
|
|
statusCode: 500,
|
|
statusMessage: 'Internal Server Error',
|
|
client:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 180,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
_consuming: false,
|
|
_dumped: false,
|
|
req:
|
|
ClientRequest {
|
|
_events: [Object],
|
|
_eventsCount: 5,
|
|
_maxListeners: undefined,
|
|
output: [],
|
|
outputEncodings: [],
|
|
outputCallbacks: [],
|
|
outputSize: 0,
|
|
writable: true,
|
|
_last: true,
|
|
chunkedEncoding: false,
|
|
shouldKeepAlive: false,
|
|
useChunkedEncodingByDefault: true,
|
|
sendDate: false,
|
|
_removedConnection: false,
|
|
_removedContLen: false,
|
|
_removedTE: false,
|
|
_contentLength: null,
|
|
_hasBody: true,
|
|
_trailer: '',
|
|
finished: true,
|
|
_headerSent: true,
|
|
socket: [Socket],
|
|
connection: [Socket],
|
|
_header:
|
|
'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n',
|
|
_onPendingData: [Function: noopPendingOutput],
|
|
agent: [Agent],
|
|
socketPath: undefined,
|
|
timeout: undefined,
|
|
method: 'POST',
|
|
path: '/v1/VoipCarriers',
|
|
_ended: true,
|
|
res: [Circular],
|
|
aborted: undefined,
|
|
timeoutCb: null,
|
|
upgradeOrConnect: false,
|
|
parser: null,
|
|
maxHeadersCount: null,
|
|
[Symbol(isCorked)]: false,
|
|
[Symbol(outHeadersKey)]: [Object] },
|
|
request:
|
|
Request {
|
|
_events: [Object],
|
|
_eventsCount: 5,
|
|
_maxListeners: undefined,
|
|
resolveWithFullResponse: true,
|
|
body: '{"name":"daveh"}',
|
|
uri: [Url],
|
|
method: 'POST',
|
|
readable: true,
|
|
writable: true,
|
|
explicitMethod: true,
|
|
_qs: [Querystring],
|
|
_auth: [Auth],
|
|
_oauth: [OAuth],
|
|
_multipart: [Multipart],
|
|
_redirect: [Redirect],
|
|
_tunnel: [Tunnel],
|
|
_rp_resolve: [Function],
|
|
_rp_reject: [Function],
|
|
_rp_promise: [Promise],
|
|
_rp_callbackOrig: undefined,
|
|
callback: [Function],
|
|
_rp_options: [Object],
|
|
headers: [Object],
|
|
setHeader: [Function],
|
|
hasHeader: [Function],
|
|
getHeader: [Function],
|
|
removeHeader: [Function],
|
|
localAddress: undefined,
|
|
pool: {},
|
|
dests: [],
|
|
__isRequestRequest: true,
|
|
_callback: [Function: RP$callback],
|
|
proxy: null,
|
|
tunnel: false,
|
|
setHost: true,
|
|
originalCookieHeader: undefined,
|
|
_disableCookies: true,
|
|
_jar: undefined,
|
|
port: '3000',
|
|
host: '127.0.0.1',
|
|
path: '/v1/VoipCarriers',
|
|
_json: true,
|
|
httpModule: [Object],
|
|
agentClass: [Function],
|
|
agent: [Agent],
|
|
_started: true,
|
|
href: 'http://127.0.0.1:3000/v1/VoipCarriers',
|
|
req: [ClientRequest],
|
|
ntick: true,
|
|
response: [Circular],
|
|
originalHost: '127.0.0.1:3000',
|
|
originalHostHeaderName: 'host',
|
|
responseContent: [Circular],
|
|
_destdata: true,
|
|
_ended: true,
|
|
_callbackCalled: true },
|
|
toJSON: [Function: responseToJSON],
|
|
caseless: Caseless { dict: [Object] },
|
|
body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
|
|
✖ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
------------------------------------------------------------------------
|
|
operator: error
|
|
expected: |-
|
|
undefined
|
|
actual: |-
|
|
{ name: 'StatusCodeError', statusCode: 500, message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}', error: { msg: 'ER_NO_DB_ERROR: No database selected' }, options: { baseUrl: 'http://127.0.0.1:3000/v1', resolveWithFullResponse: true, auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, transform2xxOnly: false }, response: { _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: { end: [ [Function: responseOnEnd], [Function] ], close: [ [Function], [Function] ], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' }, rawHeaders: [ 'X-Powered-By', 'Express', 'Content-Type', 'application/json; charset=utf-8', 'Content-Length', '46', 'ETag', 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', 'Date', 'Thu, 05 Dec 2019 14:33:46 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 500, statusMessage: 'Internal Server Error', client: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, _consuming: false, _dumped: false, req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, request: { _events: { error: [Function: bound ], complete: [Function: bound ], pipe: [Function], data: [Function], end: [Function] }, _eventsCount: 5, _maxListeners: undefined, resolveWithFullResponse: true, body: '{"name":"daveh"}', uri: { protocol: 'http:', slashes: true, auth: null, host: '127.0.0.1:3000', port: '3000', hostname: '127.0.0.1', hash: null, search: null, query: null, pathname: '/v1/VoipCarriers', path: '/v1/VoipCarriers', href: 'http://127.0.0.1:3000/v1/VoipCarriers' }, method: 'POST', readable: true, writable: true, explicitMethod: true, _qs: { request: [Circular], lib: { formats: [Object], parse: [Function], stringify: [Function] }, useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: { request: [Circular], hasAuth: true, sentAuth: true, bearerToken: '38700987-c7a4-4685-a5bb-af378f9734de', user: null, pass: null }, _oauth: { request: [Circular], params: null }, _multipart: { request: [Circular], boundary: 'e0934a63-e174-408d-8db4-cb93ec98a99c', chunked: false, body: null }, _redirect: { request: [Circular], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: { request: [Circular], proxyHeaderWhiteList: [ 'accept', 'accept-charset', 'accept-encoding', 'accept-language', 'accept-ranges', 'cache-control', 'content-encoding', 'content-language', 'content-location', 'content-md5', 'content-range', 'content-type', 'connection', 'date', 'expect', 'max-forwards', 'pragma', 'referer', 'te', 'user-agent', 'via' ], proxyHeaderExclusiveList: [] }, _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: {}, _rp_callbackOrig: undefined, callback: [Function], _rp_options: { baseUrl: 'http://127.0.0.1:3000/v1', resolveWithFullResponse: true, auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, transform2xxOnly: false }, headers: { authorization: 'Bearer 38700987-c7a4-4685-a5bb-af378f9734de', accept: 'application/json', 'content-type': 'application/json', 'content-length': 16 }, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '3000', host: '127.0.0.1', path: '/v1/VoipCarriers', _json: true, httpModule: { _connectionListener: [Function: connectionListener], METHODS: [ 'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE', 'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE' ], STATUS_CODES: { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 208: 'Already Reported', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 307: 'Temporary Redirect', 308: 'Permanent Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Payload Too Large', 414: 'URI Too Long', 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', 418: 'I\'m a Teapot', 421: 'Misdirected Request', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 425: 'Unordered Collection', 426: 'Upgrade Required', 428: 'Precondition Required', 429: 'Too Many Requests', 431: 'Request Header Fields Too Large', 451: 'Unavailable For Legal Reasons', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 508: 'Loop Detected', 509: 'Bandwidth Limit Exceeded', 510: 'Not Extended', 511: 'Network Authentication Required' }, Agent: [Function: Agent], ClientRequest: [Function: ClientRequest], globalAgent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], get: [Function: get], request: [Function: request], maxHeaderSize: 8192 }, agentClass: [Function: Agent], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, _started: true, href: 'http://127.0.0.1:3000/v1/VoipCarriers', req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, connection: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, ntick: true, response: [Circular], originalHost: '127.0.0.1:3000', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: { dict: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' } }, body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
at: Test.test (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/test/voip-carriers.js:106:7)
|
|
stack: |-
|
|
StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
|
|
|
|
account tests
|
|
|
|
{"level":50, "time": "2019-12-05T14:33:46.048Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"Error querying for api key","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{"level":50, "time": "2019-12-05T14:33:46.048Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"burped error","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
|
|
✖ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
------------------------------------------------------------------------
|
|
operator: error
|
|
expected: |-
|
|
undefined
|
|
actual: |-
|
|
{ name: 'StatusCodeError', statusCode: 500, message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}', error: { msg: 'ER_NO_DB_ERROR: No database selected' }, options: { baseUrl: 'http://127.0.0.1:3000/v1', auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: { _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: { end: [ [Function: responseOnEnd], [Function] ], close: [ [Function], [Function] ], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' }, rawHeaders: [ 'X-Powered-By', 'Express', 'Content-Type', 'application/json; charset=utf-8', 'Content-Length', '46', 'ETag', 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', 'Date', 'Thu, 05 Dec 2019 14:33:46 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 500, statusMessage: 'Internal Server Error', client: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, _consuming: false, _dumped: false, req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, request: { _events: { error: [Function: bound ], complete: [Function: bound ], pipe: [Function], data: [Function], end: [Function] }, _eventsCount: 5, _maxListeners: undefined, body: '{"name":"daveh"}', uri: { protocol: 'http:', slashes: true, auth: null, host: '127.0.0.1:3000', port: '3000', hostname: '127.0.0.1', hash: null, search: null, query: null, pathname: '/v1/VoipCarriers', path: '/v1/VoipCarriers', href: 'http://127.0.0.1:3000/v1/VoipCarriers' }, method: 'POST', readable: true, writable: true, explicitMethod: true, _qs: { request: [Circular], lib: { formats: [Object], parse: [Function], stringify: [Function] }, useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: { request: [Circular], hasAuth: true, sentAuth: true, bearerToken: '38700987-c7a4-4685-a5bb-af378f9734de', user: null, pass: null }, _oauth: { request: [Circular], params: null }, _multipart: { request: [Circular], boundary: '74402418-46db-4128-9e3a-e1db8826132f', chunked: false, body: null }, _redirect: { request: [Circular], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: { request: [Circular], proxyHeaderWhiteList: [ 'accept', 'accept-charset', 'accept-encoding', 'accept-language', 'accept-ranges', 'cache-control', 'content-encoding', 'content-language', 'content-location', 'content-md5', 'content-range', 'content-type', 'connection', 'date', 'expect', 'max-forwards', 'pragma', 'referer', 'te', 'user-agent', 'via' ], proxyHeaderExclusiveList: [] }, _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: {}, _rp_callbackOrig: undefined, callback: [Function], _rp_options: { baseUrl: 'http://127.0.0.1:3000/v1', auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, headers: { authorization: 'Bearer 38700987-c7a4-4685-a5bb-af378f9734de', accept: 'application/json', 'content-type': 'application/json', 'content-length': 16 }, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '3000', host: '127.0.0.1', path: '/v1/VoipCarriers', _json: true, httpModule: { _connectionListener: [Function: connectionListener], METHODS: [ 'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE', 'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE' ], STATUS_CODES: { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 208: 'Already Reported', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 307: 'Temporary Redirect', 308: 'Permanent Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Payload Too Large', 414: 'URI Too Long', 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', 418: 'I\'m a Teapot', 421: 'Misdirected Request', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 425: 'Unordered Collection', 426: 'Upgrade Required', 428: 'Precondition Required', 429: 'Too Many Requests', 431: 'Request Header Fields Too Large', 451: 'Unavailable For Legal Reasons', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 508: 'Loop Detected', 509: 'Bandwidth Limit Exceeded', 510: 'Not Extended', 511: 'Network Authentication Required' }, Agent: [Function: Agent], ClientRequest: [Function: ClientRequest], globalAgent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], get: [Function: get], request: [Function: request], maxHeaderSize: 8192 }, agentClass: [Function: Agent], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, _started: true, href: 'http://127.0.0.1:3000/v1/VoipCarriers', req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, connection: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, ntick: true, response: [Circular], originalHost: '127.0.0.1:3000', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: { dict: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' } }, body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
at: Test.test (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/test/accounts.js:96:7)
|
|
stack: |-
|
|
StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
|
|
|
|
phone number tests
|
|
|
|
{"level":50, "time": "2019-12-05T14:33:46.062Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"Error querying for api key","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{"level":50, "time": "2019-12-05T14:33:46.062Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"burped error","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
name: 'StatusCodeError',
|
|
statusCode: 500,
|
|
message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}',
|
|
error: { msg: 'ER_NO_DB_ERROR: No database selected' },
|
|
options:
|
|
{ baseUrl: 'http://127.0.0.1:3000/v1',
|
|
auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' },
|
|
json: true,
|
|
body: { name: 'daveh' },
|
|
uri: '/VoipCarriers',
|
|
method: 'POST',
|
|
callback: [Function: RP$callback],
|
|
transform: undefined,
|
|
simple: true,
|
|
resolveWithFullResponse: false,
|
|
transform2xxOnly: false },
|
|
response:
|
|
IncomingMessage {
|
|
_readableState:
|
|
ReadableState {
|
|
objectMode: false,
|
|
highWaterMark: 16384,
|
|
buffer: BufferList { head: null, tail: null, length: 0 },
|
|
length: 0,
|
|
pipes: null,
|
|
pipesCount: 0,
|
|
flowing: true,
|
|
ended: true,
|
|
endEmitted: true,
|
|
reading: false,
|
|
sync: true,
|
|
needReadable: false,
|
|
emittedReadable: false,
|
|
readableListening: false,
|
|
resumeScheduled: false,
|
|
paused: false,
|
|
emitClose: true,
|
|
destroyed: false,
|
|
defaultEncoding: 'utf8',
|
|
awaitDrain: 0,
|
|
readingMore: true,
|
|
decoder: null,
|
|
encoding: null },
|
|
readable: false,
|
|
_events:
|
|
[Object: null prototype] {
|
|
end: [Array],
|
|
close: [Array],
|
|
data: [Function],
|
|
error: [Function] },
|
|
_eventsCount: 4,
|
|
_maxListeners: undefined,
|
|
socket:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 303,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
connection:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 303,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
httpVersionMajor: 1,
|
|
httpVersionMinor: 1,
|
|
httpVersion: '1.1',
|
|
complete: true,
|
|
headers:
|
|
{ 'x-powered-by': 'Express',
|
|
'content-type': 'application/json; charset=utf-8',
|
|
'content-length': '46',
|
|
etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"',
|
|
date: 'Thu, 05 Dec 2019 14:33:46 GMT',
|
|
connection: 'close' },
|
|
rawHeaders:
|
|
[ 'X-Powered-By',
|
|
'Express',
|
|
'Content-Type',
|
|
'application/json; charset=utf-8',
|
|
'Content-Length',
|
|
'46',
|
|
'ETag',
|
|
'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"',
|
|
'Date',
|
|
'Thu, 05 Dec 2019 14:33:46 GMT',
|
|
'Connection',
|
|
'close' ],
|
|
trailers: {},
|
|
rawTrailers: [],
|
|
aborted: false,
|
|
upgrade: false,
|
|
url: '',
|
|
method: null,
|
|
statusCode: 500,
|
|
statusMessage: 'Internal Server Error',
|
|
client:
|
|
Socket {
|
|
connecting: false,
|
|
_hadError: false,
|
|
_handle: [TCP],
|
|
_parent: null,
|
|
_host: null,
|
|
_readableState: [ReadableState],
|
|
readable: true,
|
|
_events: [Object],
|
|
_eventsCount: 7,
|
|
_maxListeners: undefined,
|
|
_writableState: [WritableState],
|
|
writable: false,
|
|
allowHalfOpen: false,
|
|
_sockname: null,
|
|
_pendingData: null,
|
|
_pendingEncoding: '',
|
|
server: null,
|
|
_server: null,
|
|
parser: null,
|
|
_httpMessage: [ClientRequest],
|
|
[Symbol(asyncId)]: 303,
|
|
[Symbol(lastWriteQueueSize)]: 0,
|
|
[Symbol(timeout)]: null,
|
|
[Symbol(kBytesRead)]: 0,
|
|
[Symbol(kBytesWritten)]: 0 },
|
|
_consuming: false,
|
|
_dumped: false,
|
|
req:
|
|
ClientRequest {
|
|
_events: [Object],
|
|
_eventsCount: 5,
|
|
_maxListeners: undefined,
|
|
output: [],
|
|
outputEncodings: [],
|
|
outputCallbacks: [],
|
|
outputSize: 0,
|
|
writable: true,
|
|
_last: true,
|
|
chunkedEncoding: false,
|
|
shouldKeepAlive: false,
|
|
useChunkedEncodingByDefault: true,
|
|
sendDate: false,
|
|
_removedConnection: false,
|
|
_removedContLen: false,
|
|
_removedTE: false,
|
|
_contentLength: null,
|
|
_hasBody: true,
|
|
_trailer: '',
|
|
finished: true,
|
|
_headerSent: true,
|
|
socket: [Socket],
|
|
connection: [Socket],
|
|
_header:
|
|
'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n',
|
|
_onPendingData: [Function: noopPendingOutput],
|
|
agent: [Agent],
|
|
socketPath: undefined,
|
|
timeout: undefined,
|
|
method: 'POST',
|
|
path: '/v1/VoipCarriers',
|
|
_ended: true,
|
|
res: [Circular],
|
|
aborted: undefined,
|
|
timeoutCb: null,
|
|
upgradeOrConnect: false,
|
|
parser: null,
|
|
maxHeadersCount: null,
|
|
[Symbol(isCorked)]: false,
|
|
[Symbol(outHeadersKey)]: [Object] },
|
|
request:
|
|
Request {
|
|
_events: [Object],
|
|
_eventsCount: 5,
|
|
_maxListeners: undefined,
|
|
body: '{"name":"daveh"}',
|
|
uri: [Url],
|
|
method: 'POST',
|
|
readable: true,
|
|
writable: true,
|
|
explicitMethod: true,
|
|
_qs: [Querystring],
|
|
_auth: [Auth],
|
|
_oauth: [OAuth],
|
|
_multipart: [Multipart],
|
|
_redirect: [Redirect],
|
|
_tunnel: [Tunnel],
|
|
_rp_resolve: [Function],
|
|
_rp_reject: [Function],
|
|
_rp_promise: [Promise],
|
|
_rp_callbackOrig: undefined,
|
|
callback: [Function],
|
|
_rp_options: [Object],
|
|
headers: [Object],
|
|
setHeader: [Function],
|
|
hasHeader: [Function],
|
|
getHeader: [Function],
|
|
removeHeader: [Function],
|
|
localAddress: undefined,
|
|
pool: {},
|
|
dests: [],
|
|
__isRequestRequest: true,
|
|
_callback: [Function: RP$callback],
|
|
proxy: null,
|
|
tunnel: false,
|
|
setHost: true,
|
|
originalCookieHeader: undefined,
|
|
_disableCookies: true,
|
|
_jar: undefined,
|
|
port: '3000',
|
|
host: '127.0.0.1',
|
|
path: '/v1/VoipCarriers',
|
|
_json: true,
|
|
httpModule: [Object],
|
|
agentClass: [Function],
|
|
agent: [Agent],
|
|
_started: true,
|
|
href: 'http://127.0.0.1:3000/v1/VoipCarriers',
|
|
req: [ClientRequest],
|
|
ntick: true,
|
|
response: [Circular],
|
|
originalHost: '127.0.0.1:3000',
|
|
originalHostHeaderName: 'host',
|
|
responseContent: [Circular],
|
|
_destdata: true,
|
|
_ended: true,
|
|
_callbackCalled: true },
|
|
toJSON: [Function: responseToJSON],
|
|
caseless: Caseless { dict: [Object] },
|
|
body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
|
|
✖ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
------------------------------------------------------------------------
|
|
operator: error
|
|
expected: |-
|
|
undefined
|
|
actual: |-
|
|
{ name: 'StatusCodeError', statusCode: 500, message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}', error: { msg: 'ER_NO_DB_ERROR: No database selected' }, options: { baseUrl: 'http://127.0.0.1:3000/v1', auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: { _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: { end: [ [Function: responseOnEnd], [Function] ], close: [ [Function], [Function] ], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' }, rawHeaders: [ 'X-Powered-By', 'Express', 'Content-Type', 'application/json; charset=utf-8', 'Content-Length', '46', 'ETag', 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', 'Date', 'Thu, 05 Dec 2019 14:33:46 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 500, statusMessage: 'Internal Server Error', client: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, _consuming: false, _dumped: false, req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, request: { _events: { error: [Function: bound ], complete: [Function: bound ], pipe: [Function], data: [Function], end: [Function] }, _eventsCount: 5, _maxListeners: undefined, body: '{"name":"daveh"}', uri: { protocol: 'http:', slashes: true, auth: null, host: '127.0.0.1:3000', port: '3000', hostname: '127.0.0.1', hash: null, search: null, query: null, pathname: '/v1/VoipCarriers', path: '/v1/VoipCarriers', href: 'http://127.0.0.1:3000/v1/VoipCarriers' }, method: 'POST', readable: true, writable: true, explicitMethod: true, _qs: { request: [Circular], lib: { formats: [Object], parse: [Function], stringify: [Function] }, useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: { request: [Circular], hasAuth: true, sentAuth: true, bearerToken: '38700987-c7a4-4685-a5bb-af378f9734de', user: null, pass: null }, _oauth: { request: [Circular], params: null }, _multipart: { request: [Circular], boundary: 'a1342398-8a8f-4a35-b8fe-226ebed9666d', chunked: false, body: null }, _redirect: { request: [Circular], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: { request: [Circular], proxyHeaderWhiteList: [ 'accept', 'accept-charset', 'accept-encoding', 'accept-language', 'accept-ranges', 'cache-control', 'content-encoding', 'content-language', 'content-location', 'content-md5', 'content-range', 'content-type', 'connection', 'date', 'expect', 'max-forwards', 'pragma', 'referer', 'te', 'user-agent', 'via' ], proxyHeaderExclusiveList: [] }, _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: {}, _rp_callbackOrig: undefined, callback: [Function], _rp_options: { baseUrl: 'http://127.0.0.1:3000/v1', auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, headers: { authorization: 'Bearer 38700987-c7a4-4685-a5bb-af378f9734de', accept: 'application/json', 'content-type': 'application/json', 'content-length': 16 }, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '3000', host: '127.0.0.1', path: '/v1/VoipCarriers', _json: true, httpModule: { _connectionListener: [Function: connectionListener], METHODS: [ 'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE', 'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE' ], STATUS_CODES: { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 208: 'Already Reported', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 307: 'Temporary Redirect', 308: 'Permanent Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Payload Too Large', 414: 'URI Too Long', 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', 418: 'I\'m a Teapot', 421: 'Misdirected Request', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 425: 'Unordered Collection', 426: 'Upgrade Required', 428: 'Precondition Required', 429: 'Too Many Requests', 431: 'Request Header Fields Too Large', 451: 'Unavailable For Legal Reasons', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 508: 'Loop Detected', 509: 'Bandwidth Limit Exceeded', 510: 'Not Extended', 511: 'Network Authentication Required' }, Agent: [Function: Agent], ClientRequest: [Function: ClientRequest], globalAgent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], get: [Function: get], request: [Function: request], maxHeaderSize: 8192 }, agentClass: [Function: Agent], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, _started: true, href: 'http://127.0.0.1:3000/v1/VoipCarriers', req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, connection: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, ntick: true, response: [Circular], originalHost: '127.0.0.1:3000', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: { dict: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' } }, body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
at: Test.test (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/test/phone-numbers.js:118:7)
|
|
stack: |-
|
|
StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
|
|
|
|
application tests
|
|
|
|
{"level":50, "time": "2019-12-05T14:33:46.073Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"Error querying for api key","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
{"level":50, "time": "2019-12-05T14:33:46.073Z","pid":85088,"hostname":"MacBook-Pro-4.local","code":"ER_NO_DB_ERROR","errno":1046,"sqlMessage":"No database selected","sqlState":"3D000","index":0,"sql":"\n SELECT *\n FROM api_keys\n WHERE api_keys.token = '38700987-c7a4-4685-a5bb-af378f9734de'","msg":"burped error","stack":"Error: ER_NO_DB_ERROR: No database selected\n at Query.Sequence._packetToError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Query.ErrorPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:91:28)\n at Socket.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Socket.emit (events.js:189:13)\n at addChunk (_stream_readable.js:284:12)\n --------------------\n at Protocol._enqueue (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at PoolConnection.query (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:201:25)\n at getMysqlConnection (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/lib/auth/index.js:17:14)\n at Ping.onOperationComplete (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Pool.js:110:5)\n at Ping.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:525:10)\n at Ping._callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/Connection.js:491:16)\n at Ping.Sequence.end (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n at Ping.Sequence.OkPacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:92:8)\n at Protocol._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/mysql/lib/protocol/Parser.js:433:10)","type":"Error","v":1}
|
|
|
|
✖ StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
------------------------------------------------------------------------
|
|
operator: error
|
|
expected: |-
|
|
undefined
|
|
actual: |-
|
|
{ name: 'StatusCodeError', statusCode: 500, message: '500 - {"msg":"ER_NO_DB_ERROR: No database selected"}', error: { msg: 'ER_NO_DB_ERROR: No database selected' }, options: { baseUrl: 'http://127.0.0.1:3000/v1', auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: { _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: { end: [ [Function: responseOnEnd], [Function] ], close: [ [Function], [Function] ], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' }, rawHeaders: [ 'X-Powered-By', 'Express', 'Content-Type', 'application/json; charset=utf-8', 'Content-Length', '46', 'ETag', 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', 'Date', 'Thu, 05 Dec 2019 14:33:46 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 500, statusMessage: 'Internal Server Error', client: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [ [Function: onClose], [Function: socketCloseListener] ], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: { next: [Object], entry: null, finish: [Function: bound onCorkedFinish] } }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null } }, _consuming: false, _dumped: false, req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, connection: { connecting: false, _hadError: false, _handle: { reading: true, onread: [Function: onStreamRead], onconnection: null }, _parent: null, _host: null, _readableState: { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: { end: [Function: onReadableStreamEnd], free: [Function: onFree], close: [Object], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener], finish: [Function: bound onceWrapper] }, _eventsCount: 7, _maxListeners: undefined, _writableState: { objectMode: false, highWaterMark: 16384, finalCalled: true, needDrain: false, ending: true, ended: true, finished: false, destroyed: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 1, prefinished: false, errorEmitted: false, emitClose: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, request: { _events: { error: [Function: bound ], complete: [Function: bound ], pipe: [Function], data: [Function], end: [Function] }, _eventsCount: 5, _maxListeners: undefined, body: '{"name":"daveh"}', uri: { protocol: 'http:', slashes: true, auth: null, host: '127.0.0.1:3000', port: '3000', hostname: '127.0.0.1', hash: null, search: null, query: null, pathname: '/v1/VoipCarriers', path: '/v1/VoipCarriers', href: 'http://127.0.0.1:3000/v1/VoipCarriers' }, method: 'POST', readable: true, writable: true, explicitMethod: true, _qs: { request: [Circular], lib: { formats: [Object], parse: [Function], stringify: [Function] }, useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: { request: [Circular], hasAuth: true, sentAuth: true, bearerToken: '38700987-c7a4-4685-a5bb-af378f9734de', user: null, pass: null }, _oauth: { request: [Circular], params: null }, _multipart: { request: [Circular], boundary: 'fdc0db5c-3755-4cbb-82d7-fa033fa951da', chunked: false, body: null }, _redirect: { request: [Circular], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: { request: [Circular], proxyHeaderWhiteList: [ 'accept', 'accept-charset', 'accept-encoding', 'accept-language', 'accept-ranges', 'cache-control', 'content-encoding', 'content-language', 'content-location', 'content-md5', 'content-range', 'content-type', 'connection', 'date', 'expect', 'max-forwards', 'pragma', 'referer', 'te', 'user-agent', 'via' ], proxyHeaderExclusiveList: [] }, _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: {}, _rp_callbackOrig: undefined, callback: [Function], _rp_options: { baseUrl: 'http://127.0.0.1:3000/v1', auth: { bearer: '38700987-c7a4-4685-a5bb-af378f9734de' }, json: true, body: { name: 'daveh' }, uri: '/VoipCarriers', method: 'POST', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, headers: { authorization: 'Bearer 38700987-c7a4-4685-a5bb-af378f9734de', accept: 'application/json', 'content-type': 'application/json', 'content-length': 16 }, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '3000', host: '127.0.0.1', path: '/v1/VoipCarriers', _json: true, httpModule: { _connectionListener: [Function: connectionListener], METHODS: [ 'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE', 'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE' ], STATUS_CODES: { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 208: 'Already Reported', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 307: 'Temporary Redirect', 308: 'Permanent Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Payload Too Large', 414: 'URI Too Long', 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', 418: 'I\'m a Teapot', 421: 'Misdirected Request', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 425: 'Unordered Collection', 426: 'Upgrade Required', 428: 'Precondition Required', 429: 'Too Many Requests', 431: 'Request Header Fields Too Large', 451: 'Unavailable For Legal Reasons', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 508: 'Loop Detected', 509: 'Bandwidth Limit Exceeded', 510: 'Not Extended', 511: 'Network Authentication Required' }, Agent: [Function: Agent], ClientRequest: [Function: ClientRequest], globalAgent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], get: [Function: get], request: [Function: request], maxHeaderSize: 8192 }, agentClass: [Function: Agent], agent: { _events: { free: [Function] }, _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: { path: null }, requests: {}, sockets: { '127.0.0.1:3000:': [Object] }, freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, _started: true, href: 'http://127.0.0.1:3000/v1/VoipCarriers', req: { _events: { socket: [Function], response: [Function: bound ], error: [Function: bound ], drain: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, connection: { connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: null, _readableState: [Object], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Object] }, _header: 'POST /v1/VoipCarriers HTTP/1.1\r\nhost: 127.0.0.1:3000\r\nauthorization: Bearer 38700987-c7a4-4685-a5bb-af378f9734de\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 16\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: [Object], sockets: [Object], freeSockets: [Object], keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'POST', path: '/v1/VoipCarriers', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null }, ntick: true, response: [Circular], originalHost: '127.0.0.1:3000', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: { dict: { 'x-powered-by': 'Express', 'content-type': 'application/json; charset=utf-8', 'content-length': '46', etag: 'W/"2e-aOVpxzvH5QCcOOYpNSVGq9uYJeA"', date: 'Thu, 05 Dec 2019 14:33:46 GMT', connection: 'close' } }, body: { msg: 'ER_NO_DB_ERROR: No database selected' } } }
|
|
at: Test.test (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/test/applications.js:106:7)
|
|
stack: |-
|
|
StatusCodeError: 500 - {"msg":"ER_NO_DB_ERROR: No database selected"}
|
|
at new StatusCodeError (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/errors.js:32:15)
|
|
at Request.plumbing.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:104:33)
|
|
at Request.RP$callback [as _callback] (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request-promise-core/lib/plumbing.js:46:31)
|
|
at Request.self.callback (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:185:22)
|
|
at Request.emit (events.js:189:13)
|
|
at Request.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1161:10)
|
|
at Request.emit (events.js:189:13)
|
|
at IncomingMessage.<anonymous> (/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/git/jambones-api-server/node_modules/request/request.js:1083:12)
|
|
at Object.onceWrapper (events.js:277:13)
|
|
at IncomingMessage.emit (events.js:194:15)
|
|
|
|
|
|
dropping jambones_test database
|
|
|
|
✔ database successfully dropped
|