diff --git a/api-client/src/runs/updateErrorRecoveryPolicy.ts b/api-client/src/runs/updateErrorRecoveryPolicy.ts index 023e30d4029..2efdd974775 100644 --- a/api-client/src/runs/updateErrorRecoveryPolicy.ts +++ b/api-client/src/runs/updateErrorRecoveryPolicy.ts @@ -6,7 +6,7 @@ import type { ErrorRecoveryPolicy, IfMatchType, UpdateErrorRecoveryPolicyRequest, - ErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyResponse, } from './types' import type { RunCommandError, RunTimeCommand } from '@opentrons/shared-data' @@ -20,15 +20,13 @@ export function updateErrorRecoveryPolicy( config: HostConfig, runId: string, policyRules: RecoveryPolicyRulesParams -): ResponsePromise { +): ResponsePromise { const policy = buildErrorRecoveryPolicyBody(policyRules) - return request( - PUT, - `/runs/${runId}/errorRecoveryPolicy`, - { data: policy }, - config - ) + return request< + UpdateErrorRecoveryPolicyResponse, + UpdateErrorRecoveryPolicyRequest + >(PUT, `/runs/${runId}/errorRecoveryPolicy`, { data: policy }, config) } function buildErrorRecoveryPolicyBody(