Skip to content

Commit 5021b54

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add docs for 404 not found error in cost-onboarding-api (#2667)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9323f9d commit 5021b54

File tree

8 files changed

+172
-3
lines changed

8 files changed

+172
-3
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "e22129c",
3-
"generated": "2025-08-25 17:47:25.815"
2+
"spec_repo_commit": "1e6c346",
3+
"generated": "2025-08-25 18:45:49.323"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49699,6 +49699,12 @@ paths:
4969949699
schema:
4970049700
$ref: '#/components/schemas/APIErrorResponse'
4970149701
description: Forbidden
49702+
'404':
49703+
content:
49704+
application/json:
49705+
schema:
49706+
$ref: '#/components/schemas/APIErrorResponse'
49707+
description: Not Found
4970249708
'429':
4970349709
$ref: '#/components/responses/TooManyRequestsResponse'
4970449710
security:
@@ -49851,6 +49857,12 @@ paths:
4985149857
schema:
4985249858
$ref: '#/components/schemas/APIErrorResponse'
4985349859
description: Forbidden
49860+
'404':
49861+
content:
49862+
application/json:
49863+
schema:
49864+
$ref: '#/components/schemas/APIErrorResponse'
49865+
description: Not Found
4985449866
'429':
4985549867
$ref: '#/components/responses/TooManyRequestsResponse'
4985649868
security:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-08-25T15:10:14.494Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Update Cloud Cost Management AWS CUR config returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "8c65e0d7a670e21d106e88f4d15c774b",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 81,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 585,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "PATCH",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"is_enabled\":true},\"type\":\"aws_cur_config_patch_request\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/cost/aws_cur_config/12345678"
39+
},
40+
"response": {
41+
"bodySize": 119,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 119,
45+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Cloud account not found\",\"detail\":\"Cloud account with ID 12345678 was not found\"}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 659,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 404,
58+
"statusText": "Not Found"
59+
},
60+
"startedDateTime": "2025-08-25T15:10:14.498Z",
61+
"time": 111
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-08-25T15:10:28.926Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Update Cloud Cost Management Azure config returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "123c815bd1ef26bdca56223c458cd322",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 82,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 588,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "PATCH",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"is_enabled\":true},\"type\":\"azure_uc_config_patch_request\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/cost/azure_uc_config/12345678"
39+
},
40+
"response": {
41+
"bodySize": 119,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 119,
45+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Cloud account not found\",\"detail\":\"Cloud account with ID 12345678 was not found\"}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 668,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 404,
58+
"statusText": "Not Found"
59+
},
60+
"startedDateTime": "2025-08-25T15:10:28.929Z",
61+
"time": 119
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}

features/v2/cloud_cost_management.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ Feature: Cloud Cost Management
267267
When the request is sent
268268
Then the response status is 200 OK
269269

270+
@team:Datadog/cloud-cost-management
271+
Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response
272+
Given new "UpdateCostAWSCURConfig" request
273+
And request contains "cloud_account_id" parameter with value 12345678
274+
And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}}
275+
When the request is sent
276+
Then the response status is 404 Not Found
277+
270278
@replay-only @team:Datadog/cloud-cost-management
271279
Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response
272280
Given new "UpdateCostAWSCURConfig" request
@@ -284,6 +292,14 @@ Feature: Cloud Cost Management
284292
When the request is sent
285293
Then the response status is 400 Bad Request
286294

295+
@team:Datadog/cloud-cost-management
296+
Scenario: Update Cloud Cost Management Azure config returns "Not Found" response
297+
Given new "UpdateCostAzureUCConfigs" request
298+
And request contains "cloud_account_id" parameter with value 12345678
299+
And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}}
300+
When the request is sent
301+
Then the response status is 404 Not Found
302+
287303
@replay-only @team:Datadog/cloud-cost-management
288304
Scenario: Update Cloud Cost Management Azure config returns "OK" response
289305
Given new "UpdateCostAzureUCConfigs" request

services/cloud_cost_management/src/v2/CloudCostManagementApi.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,11 @@ export class CloudCostManagementApiResponseProcessor {
18601860
) as AwsCURConfigsResponse;
18611861
return body;
18621862
}
1863-
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
1863+
if (
1864+
response.httpStatusCode === 403 ||
1865+
response.httpStatusCode === 404 ||
1866+
response.httpStatusCode === 429
1867+
) {
18641868
const bodyText = parse(await response.body.text(), contentType);
18651869
let body: APIErrorResponse;
18661870
try {
@@ -1919,6 +1923,7 @@ export class CloudCostManagementApiResponseProcessor {
19191923
if (
19201924
response.httpStatusCode === 400 ||
19211925
response.httpStatusCode === 403 ||
1926+
response.httpStatusCode === 404 ||
19221927
response.httpStatusCode === 429
19231928
) {
19241929
const bodyText = parse(await response.body.text(), contentType);

0 commit comments

Comments
 (0)