Skip to content

Commit aa16d2d

Browse files
committed
fix(okta): forward the abort signal through the group read-modify-write
1 parent fbfdc57 commit aa16d2d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/sim/tools/okta/update_group.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ export const oktaUpdateGroupTool: ToolConfig<OktaUpdateGroupParams, OktaUpdateGr
7878
* every rename, along with any custom attribute the org had defined. Reading
7979
* first is the only way an omitted field can mean "leave it alone".
8080
*/
81-
directExecution: async (params): Promise<ToolResponse> => {
81+
directExecution: async (params, signal): Promise<ToolResponse> => {
8282
const domain = validateOktaDomain(params.domain)
8383
const url = `https://${domain}/api/v1/groups/${encodeURIComponent(params.groupId.trim())}`
8484
const headers = oktaHeaders(params.apiKey)
8585

86-
const readResponse = await fetch(url, { headers })
86+
const readResponse = await fetch(url, { headers, signal })
8787
if (!readResponse.ok) {
8888
await throwOktaError(readResponse, logger, 'Failed to load group for update in Okta')
8989
}
@@ -93,6 +93,7 @@ export const oktaUpdateGroupTool: ToolConfig<OktaUpdateGroupParams, OktaUpdateGr
9393
method: 'PUT',
9494
headers,
9595
body: JSON.stringify({ profile: mergeOktaGroupProfile(existing.profile, params) }),
96+
signal,
9697
})
9798

9899
return transformUpdateGroupResponse(writeResponse)

0 commit comments

Comments
 (0)