Skip to content

Commit

Permalink
fix: notify api returns internal error on malformed id (awslabs#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssvegaraju authored Jan 26, 2022
1 parent e319bdb commit fa2550c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ class DataEgressService extends Service {
}

const egressStoreInfo = await this.getEgressStoreInfo(environmentId);
if (!egressStoreInfo) {
throw this.boom.notFound(`Error: egress store info not found for environment ${environmentId}!`, true);
}
const isEgressStoreOwner = egressStoreInfo.createdBy === curUser;
if (!isAdmin(requestContext) && !isEgressStoreOwner) {
throw this.boom.forbidden(
Expand Down

0 comments on commit fa2550c

Please sign in to comment.