We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c23b8d commit 0a90624Copy full SHA for 0a90624
coral-service/src/main/java/com/linkedin/coral/coralservice/controller/TranslationControllerLocal.java
@@ -44,8 +44,13 @@ public ResponseEntity createInLocalMetastore(@RequestBody String statement) {
44
.body("Only queries starting with \"CREATE DATABASE|TABLE|VIEW\" are accepted.\n");
45
}
46
47
- SessionState.start(conf);
48
- run(driver, statement);
+ try {
+ SessionState.start(conf);
49
+ run(driver, statement);
50
+ } catch (Throwable t) {
51
+ final Throwable cause = t.getCause();
52
+ return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(cause == null ? t.getMessage() : cause.getMessage());
53
+ }
54
55
return ResponseEntity.status(HttpStatus.OK).body("Creation successful\n");
56
0 commit comments