Skip to content

Commit 721dbca

Browse files
feeblefakiejosh-wongbrfrn169
authored
Backport to branch(3.14) : Revise feature names in error messages (#2336)
Co-authored-by: Josh Wong <[email protected]> Co-authored-by: Toshihiro Suzuki <[email protected]>
1 parent d90c940 commit 721dbca

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ default void addNewColumnToTable(
421421
String namespace, String table, String columnName, DataType columnType, boolean encrypted)
422422
throws ExecutionException {
423423
if (encrypted) {
424-
throw new UnsupportedOperationException(
425-
CoreError.TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED.buildMessage());
424+
throw new UnsupportedOperationException(CoreError.ENCRYPTION_NOT_ENABLED.buildMessage());
426425
} else {
427426
addNewColumnToTable(namespace, table, columnName, columnType);
428427
}

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ public void createTable(
6565
}
6666

6767
if (!metadata.getEncryptedColumnNames().isEmpty()) {
68-
throw new UnsupportedOperationException(
69-
CoreError.TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED.buildMessage());
68+
throw new UnsupportedOperationException(CoreError.ENCRYPTION_NOT_ENABLED.buildMessage());
7069
}
7170

7271
try {
@@ -248,8 +247,7 @@ public void repairTable(
248247
String namespace, String table, TableMetadata metadata, Map<String, String> options)
249248
throws ExecutionException {
250249
if (!metadata.getEncryptedColumnNames().isEmpty()) {
251-
throw new UnsupportedOperationException(
252-
CoreError.TRANSPARENT_DATA_ENCRYPTION_NOT_ENABLED.buildMessage());
250+
throw new UnsupportedOperationException(CoreError.ENCRYPTION_NOT_ENABLED.buildMessage());
253251
}
254252

255253
try {

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

+3-3
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)