Skip to content

Commit

Permalink
add 403 error filter
Browse files Browse the repository at this point in the history
Signed-off-by: yubonluo <[email protected]>
  • Loading branch information
yubonluo committed Dec 11, 2024
1 parent 1ed96ad commit 48e2740
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/server/saved_objects/import/validate_references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export async function getNonExistingReferenceAsKeys(

// Error handling
const erroredObjects = bulkGetResponse.saved_objects.filter(
(obj) => obj.error && obj.error.statusCode !== 404
// BulkGet objects across workspaces will throw 403
(obj) => obj.error && ![403, 404].includes(obj.error.statusCode)
);
if (erroredObjects.length) {
const err = Boom.badRequest();
Expand Down

0 comments on commit 48e2740

Please sign in to comment.