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

Provide clear createTDF error when using unknown attributes #175

Open
ttschampel opened this issue Oct 2, 2024 · 2 comments
Open

Provide clear createTDF error when using unknown attributes #175

ttschampel opened this issue Oct 2, 2024 · 2 comments

Comments

@ttschampel
Copy link
Member

ttschampel commented Oct 2, 2024

Repro:

call the createTDF method with attribute values that do not exist.

Result:

Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: NOT_FOUND: resource not found
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:592)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:571)
	at io.opentdf.platform.sdk.Autoconfigure.newGranterFromService(Autoconfigure.java:690)
	at io.opentdf.platform.sdk.TDF.createTDF(TDF.java:387)

It is unclear that this error occurs b/c the attribute does not exist in the target platform.

Recommendation: update to provide a more meaningful error. The current error appears to point to a connectivity or platform proto mismatch vs the actual error..resulting in a lot of wasted time debugging

@mkleene
Copy link
Contributor

mkleene commented Oct 3, 2024

@ttschampel I agree that this is misleading but I think that error messages like this should originate with the platform.

There are lots of things that could be missing and unless the platform tells clients what it is I think that having clients work out what it is will be too tough and subject to change.

In cases like this we might want to just start logging what's going on in the platform so we can look there.

@ttschampel
Copy link
Member Author

I agree platform should provide useful messages. A NOT FOUND error from the platform might be ok here if the SDK provided extract context in the error message - the SDK knows its trying to look up something and it's not found, so could report that.

Otherwise, like you said platform needs to provide more context in the error

I don't think looking at platform logs is going to be an option for app developers

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

No branches or pull requests

2 participants