Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Throw helpful error when TDE validation fails #153

Closed
rjrudin opened this issue Sep 16, 2022 · 2 comments
Closed

Throw helpful error when TDE validation fails #153

rjrudin opened this issue Sep 16, 2022 · 2 comments
Milestone

Comments

@rjrudin
Copy link
Contributor

rjrudin commented Sep 16, 2022

The validation will fail if the user is not permitted to do an eval, but the user gets an Unauthorized error message, which isn't helpful. A helpful error will both inform the user as to what failed (e.g. "TDE validation failed") and suggest how to avoid the error - i.e. either permitting the user to call /v1/eval or disabling TDE validation.

@rjrudin
Copy link
Contributor Author

rjrudin commented Sep 19, 2022

We have the following in 4.3.3:

try {
	schemasDatabaseClient.newServerEval().javascript(script.toString()).eval().close();
} catch (Exception ex) {
	throw new RuntimeException("Unable to load and validate TDE templates via tde.templateBatchInsert; cause: " + ex.getMessage(), ex);
}

That's better than letting the FailedRequestException propagate, as that currently doesn't provide any helpful info - it just says "failed to apply resource at eval: Internal Server Error. Server Message: Server (not a REST instance?) did not respond with an expected REST Error message."

Unfortunately though... I'm not sure how to improve this because nothing is logged in the app server error log file, and the access log file only shows a 500.

@rjrudin
Copy link
Contributor Author

rjrudin commented Sep 23, 2022

Thinking we could log the script that was generated and recommend that the user run it in qconsole to see the actual error.

@rjrudin rjrudin added this to the 4.3.4 milestone Sep 23, 2022
rjrudin added a commit that referenced this issue Sep 26, 2022
Intent is to help user debug the error as the Java Client does not get the actual error message, nor is it in the ML error logs.
rjrudin added a commit that referenced this issue Sep 26, 2022
#153: Including the templateBatchInsert script in error message
@rjrudin rjrudin closed this as completed Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant