Skip to content
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c5be326
SK-3131 Added unary operations
skyflow-bharti Sep 8, 2026
bfb90a0
SK-3131 Added unary operations samples
skyflow-bharti Sep 8, 2026
5312943
Merge pull request #426 from skyflowapi/SK-3131-unary-operations-in-j…
skyflow-bharti Sep 8, 2026
c1d8835
[AUTOMATED] Private Release 1.1.0-dev-53129430
skyflow-bharti Sep 8, 2026
b06f35c
SK-3131 Add request id in unary operations
skyflow-bharti Sep 9, 2026
62f47e6
SK-3131 Add request id in unary operations
skyflow-bharti Sep 9, 2026
700d008
SK-3131 update request and reponse for unary opr
skyflow-bharti Sep 9, 2026
d2c67fb
SK-3131 update request and reponse for unary opr
skyflow-bharti Sep 9, 2026
c57086d
SK-3131 fix the tests
skyflow-bharti Sep 9, 2026
2005732
SK-3131 update the concurency limit and max data size limits
skyflow-bharti Sep 9, 2026
47fc68a
Merge pull request #427 from skyflowapi/SK-3131-unary-operations-in-j…
skyflow-bharti Sep 9, 2026
d6b030f
[AUTOMATED] Private Release 1.1.0-dev-47fc68af
skyflow-bharti Sep 9, 2026
c74d242
SK-3131 update samples
skyflow-bharti Sep 9, 2026
c4caac3
SK-3131 update the response strcuture
skyflow-bharti Sep 9, 2026
edec300
SK-3131 update tests
skyflow-bharti Sep 9, 2026
29217de
SK-3131 fix spell check
skyflow-bharti Sep 9, 2026
ffdd1a7
Merge pull request #428 from skyflowapi/SK-3131-unary-operations-in-j…
skyflow-bharti Sep 9, 2026
442ad85
[AUTOMATED] Private Release 1.1.0-dev-ffdd1a77
skyflow-bharti Sep 9, 2026
9177e4f
SK-3131 update samples and readme
skyflow-bharti Sep 9, 2026
e87efb3
SK-3131 update samples
skyflow-bharti Sep 9, 2026
a232d6c
Merge pull request #425 from skyflowapi/SK-3131-unary-operations-in-j…
skyflow-bharti Sep 9, 2026
1ed95ec
[AUTOMATED] Private Release 1.1.0-dev-a232d6ca
skyflow-bharti Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions common/src/main/java/com/skyflow/errors/ErrorMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,25 @@ public enum ErrorMessage {
InsufficientTokensPassedForTokenModeEnableStrict("%s0 Validation error. 'tokenMode' is set to 'ENABLE_STRICT', but some fields are missing tokens. Specify tokens for all fields."),
BatchInsertPartialSuccess("%s0 Insert operation completed with partial success."),
BatchInsertFailure("%s0 Insert operation failed."),
RecordSizeExceedError("%s0 Maximum number of records exceeded. The limit is 10000."),
RecordSizeExceedError("%s0 Maximum number of records exceeded. The limit is 100000."),

// Detokenize
InvalidDetokenizeData("%s0 Validation error. Invalid detokenize data. Specify valid detokenize data."),
EmptyDetokenizeData("%s0 Validation error. Invalid data tokens. Specify at least one data token."),
EmptyTokenInDetokenizeData("%s0 Validation error. Invalid data tokens. Specify a valid data token."),
TokensSizeExceedError("%s0 Maximum number of tokens exceeded. The limit is 10000."),
TokensSizeExceedError("%s0 Maximum number of tokens exceeded. The limit is 100000."),

// Delete
DeleteRequestNull("%s0 Validation error. DeleteRequest object is null. Specify a valid DeleteRequest object."),

// Delete Tokens
DeleteTokensRequestNull("%s0 Validation error. DeleteTokensRequest object is null. Specify a valid DeleteTokensRequest object."),
EmptyDeleteTokensData("%s0 Validation error. Tokens list is empty. Specify at least one token to delete."),
EmptyTokenInDeleteTokensData("%s0 Validation error. Invalid token in delete tokens request. Specify a valid token."),
DeleteTokensSizeExceedError("%s0 Maximum number of tokens exceeded. The limit is 10000."),
DeleteTokensSizeExceedError("%s0 Maximum number of tokens exceeded. The limit is 100000."),

// Get
GetRequestNull("%s0 Validation error. GetRequest object is null. Specify a valid GetRequest object."),
IdsKeyError("%s0 Validation error. 'ids' key is missing from the payload. Specify an 'ids' key."),
EmptyIds("%s0 Validation error. 'ids' can't be empty. Specify at least one id."),
EmptyIdInIds("%s0 Validation error. Invalid id in 'ids'. Specify a valid id."),
Expand Down Expand Up @@ -141,8 +145,13 @@ public enum ErrorMessage {
SkyflowIdKeyError("%s0 Validation error. 'skyflow_id' is missing from the data payload. Specify a 'skyflow_id'."),
InvalidSkyflowIdType("%s0 Validation error. Invalid type for 'skyflow_id' in data payload. Specify 'skyflow_id' as a string."),
EmptySkyflowId("%s0 Validation error. 'skyflow_id' can't be empty. Specify a skyflow id."),
UpdateRequestNull("%s0 Validation error. UpdateRequest object is null. Specify a valid UpdateRequest object."),
UpdateRecordNull("%s0 Validation error. UpdateRequestRecord object in the list is null. Specify a valid UpdateRequestRecord object."),
RecordSkyflowIdKeyError("%s0 Validation error. 'skyflowId' key is missing from the record. Specify a 'skyflowId' key."),
EmptySkyflowIdInRecord("%s0 Validation error. 'skyflowId' can't be empty in the record. Specify a valid skyflow ID."),

// Query
QueryRequestNull("%s0 Validation error. QueryRequest object is null. Specify a valid QueryRequest object."),
QueryKeyError("%s0 Validation error. 'query' key is missing from the payload. Specify a 'query' key."),
EmptyQuery("%s0 Validation error. 'query' can't be empty. Specify a query"),

Expand All @@ -156,7 +165,7 @@ public enum ErrorMessage {
EmptyValueInTokenizeRecord("%s0 Validation error. Value in TokenizeRecord is null or empty. Specify a valid value."),
EmptyTokenGroupNamesInTokenizeRecord("%s0 Validation error. TokenGroupNames in TokenizeRecord is null or empty. Specify at least one token group name."),
EmptyTokenGroupNameInTokenizeRecord("%s0 Validation error. Token group name in TokenizeRecord is null or empty. Specify a valid token group name."),
TokenizeDataSizeExceedError("%s0 Maximum number of tokenize records exceeded. The limit is 10000."),
TokenizeDataSizeExceedError("%s0 Maximum number of tokenize records exceeded. The limit is 100000."),
MissingIndexInBulkTokenizeRecord("%s0 Validation error. Index in BulkTokenizeRequestRecord is null. Specify an index for every record."),
DuplicateIndexInBulkTokenizeRecord("%s0 Validation error. Duplicate index in BulkTokenizeRequestRecord. Specify a unique index for every record."),

Expand Down
8 changes: 4 additions & 4 deletions common/src/main/java/com/skyflow/logs/ErrorLogs.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public enum ErrorLogs {
RECORDS_IS_REQUIRED("Invalid %s1 request. Records are required."),
EMPTY_RECORDS("Invalid %s1 request. Records can not be empty."),
INVALID_RECORD("Invalid %s1 request. Invalid record. Specify a valid record."),
RECORD_SIZE_EXCEED("Maximum number of records exceeded. The limit is 10000."),
TOKENS_SIZE_EXCEED("Maximum number of tokens exceeded. The limit is 10000."),
RECORD_SIZE_EXCEED("Maximum number of records exceeded. The limit is 100000."),
TOKENS_SIZE_EXCEED("Maximum number of tokens exceeded. The limit is 100000."),
EMPTY_OR_NULL_VALUE_IN_VALUES("Invalid %s1 request. Value can not be null or empty in values for key \"%s2\"."),
EMPTY_OR_NULL_KEY_IN_VALUES("Invalid %s1 request. Key can not be null or empty in values"),
NULL_VALUE_ENTRY_IN_VALUES("Invalid %s1 request. Value entry in 'values' can not be null at index %s2."),
Expand Down Expand Up @@ -144,15 +144,15 @@ public enum ErrorLogs {
EMPTY_VALUE_IN_TOKENIZE_RECORD("Invalid %s1 request. Value in TokenizeRecord can not be null or empty."),
EMPTY_TOKEN_GROUP_NAMES_IN_TOKENIZE_RECORD("Invalid %s1 request. TokenGroupNames in TokenizeRecord can not be null or empty."),
EMPTY_TOKEN_GROUP_NAME_IN_TOKENIZE_RECORD("Invalid %s1 request. Token group name in TokenizeRecord can not be null or empty at index %s2."),
TOKENIZE_DATA_SIZE_EXCEED("Maximum number of tokenize records exceeded. The limit is 10000."),
TOKENIZE_DATA_SIZE_EXCEED("Maximum number of tokenize records exceeded. The limit is 100000."),
MISSING_INDEX_IN_BULK_TOKENIZE_RECORD("Invalid %s1 request. Index in BulkTokenizeRequestRecord can not be null at position %s2."),
DUPLICATE_INDEX_IN_BULK_TOKENIZE_RECORD("Invalid %s1 request. Duplicate index %s2 in BulkTokenizeRequestRecord."),
DELETE_REQUEST_NULL("Invalid %s1 request. Delete request can not be null."),
DELETE_REQUEST_REJECTED("Delete request resulted in failure."),
DELETE_TOKENS_REQUEST_NULL("Invalid %s1 request. DeleteTokens request can not be null."),
EMPTY_DELETE_TOKENS_DATA("Invalid %s1 request. Delete tokens data can not be empty."),
EMPTY_OR_NULL_TOKEN_IN_DELETE_TOKENS_DATA("Invalid %s1 request. Token can not be null or empty in delete tokens data at index %s2."),
DELETE_TOKENS_SIZE_EXCEED("Maximum number of tokens exceeded. The limit is 10000."),
DELETE_TOKENS_SIZE_EXCEED("Maximum number of tokens exceeded. The limit is 100000."),
DELETE_TOKENS_REQUEST_REJECTED("DeleteTokens request resulted in failure."),

// invoke connection interface
Expand Down
16 changes: 16 additions & 0 deletions common/src/test/java/com/skyflow/errors/SkyflowExceptionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,22 @@ public void testNonJsonBodyFallsBackToRawBodyAsMessage() {
Assert.assertEquals("plain text error response", ex.getMessage());
}

@Test
public void testJsonBodyWithGenericApiErrorEnvelopeStillWorks() {
Map<String, List<String>> headers = new HashMap<>();
String json = "{\"error\":{\"grpc_code\":5,\"http_code\":404,"
+ "\"message\":\"Invalid request. Vault not found for vaultID: vault123. "
+ "Specify a valid vaultID.\",\"http_status\":\"Not Found\",\"details\":[]}}";
SkyflowException ex = new SkyflowException(404, new RuntimeException("fail"), headers, json);
Assert.assertEquals("Invalid request. Vault not found for vaultID: vault123. "
+ "Specify a valid vaultID.", ex.getMessage());
Assert.assertEquals(Integer.valueOf(5), ex.getGrpcCode());
Assert.assertEquals("Not Found", ex.getHttpStatus());
Assert.assertEquals(404, ex.getHttpCode());
Assert.assertNotNull(ex.getDetails());
Assert.assertEquals(0, ex.getDetails().size());
}

@Test
public void testNullBodyNullCauseMessageFallsBackToErrorOccurred() {
Map<String, List<String>> headers = new HashMap<>();
Expand Down
Loading
Loading