diff --git a/.generated-info b/.generated-info index a2920c38cfa1..cd86c7110b08 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "c38287b", - "generated": "2025-08-15 18:53:32.723" + "spec_repo_commit": "5fd0df2", + "generated": "2025-08-15 20:09:33.522" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cd3704553e30..32fac1498c51 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49517,6 +49517,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: @@ -49669,6 +49675,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: diff --git a/features/v2/cloud_cost_management.feature b/features/v2/cloud_cost_management.feature index 300d7094f799..eed19e63a9be 100644 --- a/features/v2/cloud_cost_management.feature +++ b/features/v2/cloud_cost_management.feature @@ -267,6 +267,14 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @team:Datadog/cloud-cost-management + Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response + Given new "UpdateCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value 12345678 + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}} + When the request is sent + Then the response status is 404 Not Found + @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response Given new "UpdateCostAWSCURConfig" request @@ -284,6 +292,14 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 400 Bad Request + @team:Datadog/cloud-cost-management + Scenario: Update Cloud Cost Management Azure config returns "Not Found" response + Given new "UpdateCostAzureUCConfigs" request + And request contains "cloud_account_id" parameter with value 12345678 + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} + When the request is sent + Then the response status is 404 Not Found + @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "OK" response Given new "UpdateCostAzureUCConfigs" request diff --git a/services/cloud_cost_management/src/v2/CloudCostManagementApi.ts b/services/cloud_cost_management/src/v2/CloudCostManagementApi.ts index 7ec29c9097c5..9a02a57e754a 100644 --- a/services/cloud_cost_management/src/v2/CloudCostManagementApi.ts +++ b/services/cloud_cost_management/src/v2/CloudCostManagementApi.ts @@ -1860,7 +1860,11 @@ export class CloudCostManagementApiResponseProcessor { ) as AwsCURConfigsResponse; return body; } - if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { const bodyText = parse(await response.body.text(), contentType); let body: APIErrorResponse; try { @@ -1919,6 +1923,7 @@ export class CloudCostManagementApiResponseProcessor { if ( response.httpStatusCode === 400 || response.httpStatusCode === 403 || + response.httpStatusCode === 404 || response.httpStatusCode === 429 ) { const bodyText = parse(await response.body.text(), contentType);