Skip to content

Commit

Permalink
SK-1317 Add continue on error in batch Insert
Browse files Browse the repository at this point in the history
- Removed requestId from responses where not required
  • Loading branch information
skyflow-vivek committed Jan 11, 2024
1 parent 3bfb43d commit 578a24c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/vault-api/Controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ class Controller {
body: config.requestBody,
headers: { 'x-skyflow-authorization': res, 'content-type': ContentType.APPLICATIONORJSON,...toLowerKeys(config.requestHeader) },
});
invokeRequest.then((response) => {
invokeRequest.then((response: any) => {
delete response.requestId;
rootResolve(response);
}).catch((err) => {
rootReject({ errors: [err] });
Expand Down
8 changes: 5 additions & 3 deletions src/vault-api/core/Collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ export const constructInsertRecordResponse = (
}
} else {
failureObjects.push({
code: status,
ddescription: `${body['error']} - requestId: ${responseBody.requestId}`,
request_index: index,
error: {
code: status,
description: `${body['error']} - requestId: ${responseBody.requestId}`,
request_index: index,
}
})
}
})
Expand Down
1 change: 1 addition & 0 deletions src/vault-api/core/Delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const deleteRecordsBySkyflowID = (
)
.then(
(response: any) => {
delete response.requestId;
deleteResponse.push(response);
},
(cause: any) => {
Expand Down

0 comments on commit 578a24c

Please sign in to comment.