Skip to content

Commit

Permalink
Updating the changelog for 9209-api
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 4, 2025
1 parent cfa9d4c commit 0d26e41
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions changelog/src/platform/20250204-1738697297064.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### February 04, 2025
## dataxp

api@6fcd6aa
The provided diff updates the AgentsService to validate that the environment ID belongs to the given account ID before upserting an agent. It adds a check to ensure that the environment hierarchy account matches the provided account ID. If the environment does not exist in the account, it throws a HandledBadRequestException with the message "Environment does not exist in account".

Additionally, it adds an end-to-end test case to ensure that the API returns a 400 Bad Request error when trying to create an agent with an environment ID that does not belong to the given account.

The diff also mocks the EventEmitter2 service in the AgentsService unit tests to test the new environment hierarchy validation logic. It adds a test case to verify that an error is thrown if the environment hierarchy account does not match the grant account.

0 comments on commit 0d26e41

Please sign in to comment.