Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Missing credential" error is not user-friendly (connecting to TypeDB Cluster without correct args) #194

Open
alexjpwalker opened this issue Jan 10, 2023 · 1 comment

Comments

@alexjpwalker
Copy link
Member

Problem to Solve

When you use ./typedb console in Cluster, it says:

[CLS06] Server Error: Missing credential.

Proposed Solution

Although it's fairly clear what the problem is, the message could definitely be nicer. For instance, it could say that the CLI arguments --username and --password are required.

@lolski
Copy link
Member

lolski commented Jul 13, 2023

To be specific, there are two other things that makes it even worse.

One, the stack trace is printed even though there's no need to:

./typedb console --cluster=typedb-cluster-1:1729 --username=admin --password
Password: <an-incorrect-password>

Welcome to TypeDB Console. You are now in TypeDB Wonderland!
Copyright (C) 2022 Vaticle

Exception in thread "main" io.grpc.StatusRuntimeException: UNAUTHENTICATED: [CLS07] Server Error: Invalid password credential.
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
	at com.vaticle.typedb.protocol.TypeDBClusterGrpc$TypeDBClusterBlockingStub.userToken(TypeDBClusterGrpc.java:775)
	at com.vaticle.typedb.client.connection.cluster.ClusterServerStub.<init>(ClusterServerStub.java:66)
	at com.vaticle.typedb.client.connection.cluster.ClusterServerClient.<init>(ClusterServerClient.java:53)
	at com.vaticle.typedb.client.connection.cluster.ClusterClient.fetchCurrentAddresses(ClusterClient.java:79)
	at com.vaticle.typedb.client.connection.cluster.ClusterClient.<init>(ClusterClient.java:69)
	at com.vaticle.typedb.client.connection.cluster.ClusterClient.<init>(ClusterClient.java:63)
	at com.vaticle.typedb.client.TypeDB.clusterClient(TypeDB.java:54)
	at com.vaticle.typedb.console.TypeDBConsole.createTypeDBClient(TypeDBConsole.java:466)
	at com.vaticle.typedb.console.TypeDBConsole.runREPLMode(TypeDBConsole.java:177)
	at com.vaticle.typedb.console.TypeDBConsole.main(TypeDBConsole.java:128)

And two, Console will actually hang rather than terminating with error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants