[ 
https://issues.apache.org/jira/browse/TINKERPOP-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Teonna Zaragoza updated TINKERPOP-2285:
---------------------------------------
    Description: 
In our currently application, we are creating an edge between two existing 
nodes. If the edge already exists, the error that is logged is:
{quote}Error: Server error: 
\{"requestId":"e44b2c9a-9542-461b-9d1b-bc3db3f869f4","code":"ConstraintViolationException","detailedMessage":"Edge
 with id already exists: TEST|77886.105.1:NO_SIZE:0->WVN"} (499)
{quote}
{quote}at Connection._handleMessage 
(/Users/tzarag/Work/mp-dagger-api/node_modules/gremlin/lib/driver/connection.js:265:9)
{quote}
{quote}at WebSocket._ws.on 
(/Users/tzarag/Work/mp-dagger-api/node_modules/gremlin/lib/driver/connection.js:128:43)
{quote}
{quote}at emitOne (events.js:116:13)
{quote}
{quote}at WebSocket.emit (events.js:211:7)
{quote}
{quote}at Receiver._receiver.onmessage 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/WebSocket.js:141:47)
{quote}
{quote}at Receiver.dataMessage 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:380:14)
{quote}
{quote}at Receiver.getData 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:330:12)
{quote}
{quote}at Receiver.startLoop 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:165:16)
{quote}
{quote}at Receiver.add 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:139:10)
{quote}
{quote}at TLSSocket._ultron.on 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/WebSocket.js:138:22)
{quote}
{quote}at emitOne (events.js:116:13)
{quote}
{quote}at TLSSocket.emit (events.js:211:7)
{quote}
{quote}at addChunk (_stream_readable.js:263:12)
{quote}
{quote}at readableAddChunk (_stream_readable.js:250:11)
{quote}
{quote}at TLSSocket.Readable.push (_stream_readable.js:208:10)
{quote}
{quote}at TLSWrap.onread (net.js:607:20)
{quote}
Please note that there is no additional message with the console.log. The 
problem is that the actual error object with reachable keys is a string within 
another error object. The stringified object is reachable via err.message. 

The error comes from the driver in connection.js line 265
{quote}newError(util.format('Server error: %s 
(%d)',response.status.message,response.status.code)));
{quote}

  was:
In our currently application, we are creating an edge. If the edge already 
exists, the error that is logged is: 

Error: Server error: 
{"requestId":"e44b2c9a-9542-461b-9d1b-bc3db3f869f4","code":"ConstraintViolationException","detailedMessage":"Edge
 with id already exists: TEST|77886.105.1:NO_SIZE:0->WVN"} (499)
    at Connection._handleMessage 
(/Users/tzarag/Work/mp-dagger-api/node_modules/gremlin/lib/driver/connection.js:265:9)
    at WebSocket._ws.on 
(/Users/tzarag/Work/mp-dagger-api/node_modules/gremlin/lib/driver/connection.js:128:43)
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
    at Receiver._receiver.onmessage 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/WebSocket.js:141:47)
    at Receiver.dataMessage 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:380:14)
    at Receiver.getData 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:330:12)
    at Receiver.startLoop 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:165:16)
    at Receiver.add 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:139:10)
    at TLSSocket._ultron.on 
(/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/WebSocket.js:138:22)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at TLSSocket.Readable.push (_stream_readable.js:208:10)
    at TLSWrap.onread (net.js:607:20)


Please note that there is no additional message with the console.log. We are 
wanting to be able to parse

connection.js line 265

newError(util.format('Server error: %s 
(%d)',response.status.message,response.status.code)));


> Error object is unreachable
> ---------------------------
>
>                 Key: TINKERPOP-2285
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2285
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: driver
>    Affects Versions: 3.3.8
>            Reporter: Teonna Zaragoza
>            Priority: Major
>
> In our currently application, we are creating an edge between two existing 
> nodes. If the edge already exists, the error that is logged is:
> {quote}Error: Server error: 
> \{"requestId":"e44b2c9a-9542-461b-9d1b-bc3db3f869f4","code":"ConstraintViolationException","detailedMessage":"Edge
>  with id already exists: TEST|77886.105.1:NO_SIZE:0->WVN"} (499)
> {quote}
> {quote}at Connection._handleMessage 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/gremlin/lib/driver/connection.js:265:9)
> {quote}
> {quote}at WebSocket._ws.on 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/gremlin/lib/driver/connection.js:128:43)
> {quote}
> {quote}at emitOne (events.js:116:13)
> {quote}
> {quote}at WebSocket.emit (events.js:211:7)
> {quote}
> {quote}at Receiver._receiver.onmessage 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/WebSocket.js:141:47)
> {quote}
> {quote}at Receiver.dataMessage 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:380:14)
> {quote}
> {quote}at Receiver.getData 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:330:12)
> {quote}
> {quote}at Receiver.startLoop 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:165:16)
> {quote}
> {quote}at Receiver.add 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/Receiver.js:139:10)
> {quote}
> {quote}at TLSSocket._ultron.on 
> (/Users/tzarag/Work/mp-dagger-api/node_modules/ws/lib/WebSocket.js:138:22)
> {quote}
> {quote}at emitOne (events.js:116:13)
> {quote}
> {quote}at TLSSocket.emit (events.js:211:7)
> {quote}
> {quote}at addChunk (_stream_readable.js:263:12)
> {quote}
> {quote}at readableAddChunk (_stream_readable.js:250:11)
> {quote}
> {quote}at TLSSocket.Readable.push (_stream_readable.js:208:10)
> {quote}
> {quote}at TLSWrap.onread (net.js:607:20)
> {quote}
> Please note that there is no additional message with the console.log. The 
> problem is that the actual error object with reachable keys is a string 
> within another error object. The stringified object is reachable via 
> err.message. 
> The error comes from the driver in connection.js line 265
> {quote}newError(util.format('Server error: %s 
> (%d)',response.status.message,response.status.code)));
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to