Moved from GitHub dgraph-js/61
Posted by felixfbecker:
I am running a mutation that fails with this error:
Error: 2 UNKNOWN: Input for predicate contents of type scalar is uid
at Object.exports.createStatusError (/Users/felix/git/sourcegraph/lsif/server/node_modules/grpc/src/common.js:91:15)
at Object.onReceiveStatus (/Users/felix/git/sourcegraph/lsif/server/node_modules/grpc/src/client_interceptors.js:1204:28)
at InterceptingListener._callNext (/Users/felix/git/sourcegraph/lsif/server/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/Users/felix/git/sourcegraph/lsif/server/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/Users/felix/git/sourcegraph/lsif/server/node_modules/grpc/src/client_interceptors.js:845:24) {
code: 2,
metadata: Metadata { _internal_repr: {}, flags: 0 },
details: 'Input for predicate contents of type scalar is uid'
}
The mutation contains thousands of nquads, so I have no idea which one is wrong. I would expect the error to include some properties about which nquad failed to get added, at least the name of the predicate. The error code also always seems to be 2, and the stack trace doesn’t include the user code.
As a comparison, errors from the node Postgres client pg
have properties that specify the query, position, even the name of a column contraint that failed.