Skip to content

Commit 3929175

Browse files
josh-wongbrfrn169
andauthored
Revise feature names in error messages (#2334)
Co-authored-by: brfrn169 <[email protected]>
1 parent 5a9f751 commit 3929175

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

core/src/main/java/com/scalar/db/api/Admin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,7 @@ default void addNewColumnToTable(
435435
String namespace, String table, String columnName, DataType columnType, boolean encrypted)
436436
throws ExecutionException {
437437
if (encrypted) {
438-
throw new UnsupportedOperationException(
439-
CoreError.TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED.buildMessage());
438+
throw new UnsupportedOperationException(CoreError.ENCRYPTION_NOT_ENABLED.buildMessage());
440439
} else {
441440
addNewColumnToTable(namespace, table, columnName, columnType);
442441
}

core/src/main/java/com/scalar/db/common/CheckedDistributedStorageAdmin.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public void createTable(
5757
}
5858

5959
if (!metadata.getEncryptedColumnNames().isEmpty()) {
60-
throw new UnsupportedOperationException(
61-
CoreError.TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED.buildMessage());
60+
throw new UnsupportedOperationException(CoreError.ENCRYPTION_NOT_ENABLED.buildMessage());
6261
}
6362

6463
try {
@@ -257,8 +256,7 @@ public void repairTable(
257256
String namespace, String table, TableMetadata metadata, Map<String, String> options)
258257
throws ExecutionException {
259258
if (!metadata.getEncryptedColumnNames().isEmpty()) {
260-
throw new UnsupportedOperationException(
261-
CoreError.TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED.buildMessage());
259+
throw new UnsupportedOperationException(CoreError.ENCRYPTION_NOT_ENABLED.buildMessage());
262260
}
263261

264262
try {

core/src/main/java/com/scalar/db/common/error/CoreError.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public enum CoreError implements ScalarDbError {
118118
AUTH_NOT_ENABLED(
119119
Category.USER_ERROR,
120120
"0022",
121-
"ScalarDB Auth is not enabled. To use ScalarDB Auth, you must enable it. Note that this feature is supported only in the ScalarDB Enterprise edition",
121+
"The authentication and authorization feature is not enabled. To use this feature, you must enable it. Note that this feature is supported only in the ScalarDB Enterprise edition",
122122
"",
123123
""),
124124
CONDITION_BUILD_ERROR_CONDITION_NOT_ALLOWED_FOR_PUT_IF(
@@ -647,10 +647,10 @@ public enum CoreError implements ScalarDbError {
647647
+ "If you want to modify a condition, please use clearConditions() to remove all existing conditions first",
648648
"",
649649
""),
650-
TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED(
650+
ENCRYPTION_NOT_ENABLED(
651651
Category.USER_ERROR,
652652
"0143",
653-
"ScalarDB Transparent Data Encryption is not enabled. To use ScalarDB Transparent Data Encryption, you must enable it. Note that this feature is supported only in the ScalarDB Enterprise edition",
653+
"The encryption feature is not enabled. To encrypt data at rest, you must enable this feature. Note that this feature is supported only in the ScalarDB Enterprise edition",
654654
"",
655655
""),
656656
INVALID_VARIABLE_KEY_COLUMN_SIZE(

0 commit comments

Comments
 (0)