Skip to content

Commit 2af99b8

Browse files
committed
Add more granular 404s -actor not found -actor run not found
1 parent d52c116 commit 2af99b8

38 files changed

Lines changed: 625 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ sources/academy/**/exercises/storage
3030
sources/academy/**/exercises/node_modules
3131
sources/academy/**/exercises/package*.json
3232
sources/academy/**/exercises/dataset.json
33+
config.bat
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
summary: Actor was not found
2+
value:
3+
error:
4+
type: actor-not-found
5+
message: Actor was not found.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
summary: Actor run was not found
2+
value:
3+
error:
4+
type: record-not-found
5+
message: Actor run was not found
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
value:
2+
data:
3+
id: HG7ML7M8z78YcAPEB
4+
actId: janedoe~my-actor
5+
userId: klmdEpoiojmdEMlk3
6+
startedAt: "2019-11-30T07:34:24.202Z"
7+
finishedAt: "2019-12-12T09:30:12.202Z"
8+
status: SUCCEEDED
9+
meta:
10+
origin: WEB
11+
clientIp: 172.234.12.34
12+
userAgent: Mozilla/5.0 (iPad)
13+
stats:
14+
durationMillis: 1000
15+
runTimeSecs: 45.718
16+
computeUnits: 0.012699444444444444
17+
options:
18+
useCache: false
19+
betaPackages: false
20+
memoryMbytes: 1024
21+
diskMbytes: 2048
22+
usage:
23+
ACTOR_COMPUTE_UNITS: 0.08
24+
usageTotalUsd: 0.02
25+
usageUsd:
26+
ACTOR_COMPUTE_UNITS: 0.02
27+
inputSchema: '{\n \"title\": \"Schema for ... }'
28+
readme: '# Magic Actor\nThis Actor is magic.'
29+
buildNumber: 0.1.1
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
value:
2+
data:
3+
total: 2
4+
offset: 0
5+
limit: 1000
6+
desc: false
7+
count: 2
8+
items:
9+
- id: HG7ML7M8z78YcAPEB
10+
actId: HDSasDasz78YcAPEB
11+
actorTaskId: KJHSKHausidyaJKHs
12+
status: SUCCEEDED
13+
startedAt: "2019-11-30T07:34:24.202Z"
14+
finishedAt: "2019-12-12T09:30:12.202Z"
15+
buildId: HG7ML7M8z78YcAPEB
16+
buildNumber: 0.0.2
17+
meta:
18+
origin: WEB
19+
usageTotalUsd: 0.2
20+
defaultKeyValueStoreId: sfAjeR4QmeJCQzTfe
21+
defaultDatasetId: 3ZojQDdFTsyE7Moy4
22+
defaultRequestQueueId: so93g2shcDzK3pA85
23+
- id: HG7ML7M8z78YcAPEB
24+
actId: HDSasDasz78YcAPEB
25+
actorTaskId: KJHSKHausidyaJKHs
26+
status: FAILED
27+
startedAt: "2019-12-12T07:34:14.202Z"
28+
finishedAt: "2019-12-13T08:36:13.202Z"
29+
buildId: u78dML7M8z78YcAPEB
30+
buildNumber: 0.2.2
31+
meta:
32+
origin: DEVELOPMENT
33+
usageTotalUsd: 0.6
34+
defaultKeyValueStoreId: sffsouqlseJCQzTfe
35+
defaultDatasetId: CFGggdjQDsyE7Moyw
36+
defaultRequestQueueId: soowucklrmDzKpA8x
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
value:
2+
data:
3+
id: HG7ML7M8z78YcAPEB
4+
actId: janedoe~my-actor
5+
userId: PNWZBd7Z9c746JAnF
6+
startedAt: "2019-11-30T07:34:24.202Z"
7+
finishedAt: null
8+
status: RUNNING
9+
statusMessage: Actor is running
10+
isStatusMessageTerminal: false
11+
meta:
12+
origin: WEB
13+
clientIp: 172.234.12.34
14+
userAgent: Mozilla/5.0 (iPad)
15+
stats:
16+
inputBodyLen: 240
17+
migrationCount: 0
18+
restartCount: 0
19+
resurrectCount: 1
20+
memAvgBytes: 35914228.4
21+
memMaxBytes: 38244352
22+
memCurrentBytes: 0
23+
cpuAvgUsage: 0.00955965
24+
cpuMaxUsage: 3.1546
25+
cpuCurrentUsage: 0
26+
netRxBytes: 2652
27+
netTxBytes: 1338
28+
durationMillis: 26239
29+
runTimeSecs: 26.239
30+
metamorph: 0
31+
computeUnits: 0.0072886
32+
options:
33+
build: latest
34+
timeoutSecs: 300
35+
memoryMbytes: 1024
36+
diskMbytes: 2048
37+
buildId: HG7ML7M8z78YcAPEB
38+
exitCode: 0
39+
generalAccess: RESTRICTED
40+
defaultKeyValueStoreId: eJNzqsbPiopwJcgGQ
41+
defaultDatasetId: wmKPijuyDnPZAPRMk
42+
defaultRequestQueueId: FL35cSF7jrxr3BY39
43+
metamorphs:
44+
- createdAt: "2019-11-30T07:39:24.202Z"
45+
actorId: nspoEjklmnsF2oosD
46+
buildId: ME6oKecqy5kXDS4KQ
47+
inputKey: INPUT-METAMORPH-1
48+
buildNumber: 0.1.10
49+
containerUrl: "https://hfewsyknno9o.runs.apify.com"
50+
isContainerServerReady: false
51+
gitBranchName: master
52+
usage:
53+
ACTOR_COMPUTE_UNITS: 3
54+
DATASET_READS: 4
55+
DATASET_WRITES: 4
56+
KEY_VALUE_STORE_READS: 5
57+
KEY_VALUE_STORE_WRITES: 3
58+
KEY_VALUE_STORE_LISTS: 5
59+
REQUEST_QUEUE_READS: 2
60+
REQUEST_QUEUE_WRITES: 1
61+
DATA_TRANSFER_INTERNAL_GBYTES: 1
62+
DATA_TRANSFER_EXTERNAL_GBYTES: 3
63+
PROXY_RESIDENTIAL_TRANSFER_GBYTES: 34
64+
PROXY_SERPS: 3
65+
usageTotalUsd: 0.2654
66+
usageUsd:
67+
ACTOR_COMPUTE_UNITS: 0.072
68+
DATASET_READS: 0.0004
69+
DATASET_WRITES: 0.0002
70+
KEY_VALUE_STORE_READS: 0.0006
71+
KEY_VALUE_STORE_WRITES: 0.002
72+
KEY_VALUE_STORE_LISTS: 0.004
73+
REQUEST_QUEUE_READS: 0.005
74+
REQUEST_QUEUE_WRITES: 0.02
75+
DATA_TRANSFER_INTERNAL_GBYTES: 0.0004
76+
DATA_TRANSFER_EXTERNAL_GBYTES: 0.0002
77+
PROXY_RESIDENTIAL_TRANSFER_GBYTES: 0.16
78+
PROXY_SERPS: 0.0006
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
value:
2+
data:
3+
id: HG7ML7M8z78YcAPEB
4+
actId: HDSasDasz78YcAPEB
5+
userId: 7sT5jcggjjA9fNcxF
6+
actorTaskId: KJHSKHausidyaJKHs
7+
startedAt: "2019-11-30T07:34:24.202Z"
8+
finishedAt: "2019-12-12T09:30:12.202Z"
9+
status: RUNNING
10+
statusMessage: Actor is running
11+
isStatusMessageTerminal: false
12+
meta:
13+
origin: WEB
14+
clientIp: 172.234.12.34
15+
userAgent: Mozilla/5.0 (iPad)
16+
stats:
17+
inputBodyLen: 240
18+
migrationCount: 0
19+
restartCount: 0
20+
resurrectCount: 2
21+
memAvgBytes: 267874071.9
22+
memMaxBytes: 404713472
23+
memCurrentBytes: 0
24+
cpuAvgUsage: 33.75321011075384
25+
cpuMaxUsage: 169.65073553494125
26+
cpuCurrentUsage: 0
27+
netRxBytes: 103508042
28+
netTxBytes: 4854600
29+
durationMillis: 248472
30+
runTimeSecs: 248.472
31+
metamorph: 0
32+
computeUnits: 0.13804
33+
options:
34+
build: latest
35+
timeoutSecs: 300
36+
memoryMbytes: 1024
37+
diskMbytes: 2048
38+
buildId: 7sT5jcggjjA9fNcxF
39+
exitCode: 0
40+
generalAccess: RESTRICTED
41+
defaultKeyValueStoreId: eJNzqsbPiopwJcgGQ
42+
defaultDatasetId: wmKPijuyDnPZAPRMk
43+
defaultRequestQueueId: FL35cSF7jrxr3BY39
44+
buildNumber: 0.0.36
45+
containerUrl: "https://g8kd8kbc5ge8.runs.apify.net"
46+
isContainerServerReady: true
47+
gitBranchName: master
48+
usage:
49+
ACTOR_COMPUTE_UNITS: 3
50+
DATASET_READS: 4
51+
DATASET_WRITES: 4
52+
KEY_VALUE_STORE_READS: 5
53+
KEY_VALUE_STORE_WRITES: 3
54+
KEY_VALUE_STORE_LISTS: 5
55+
REQUEST_QUEUE_READS: 2
56+
REQUEST_QUEUE_WRITES: 1
57+
DATA_TRANSFER_INTERNAL_GBYTES: 1
58+
DATA_TRANSFER_EXTERNAL_GBYTES: 3
59+
PROXY_RESIDENTIAL_TRANSFER_GBYTES: 34
60+
PROXY_SERPS: 3
61+
usageTotalUsd: 0.2654
62+
usageUsd:
63+
ACTOR_COMPUTE_UNITS: 0.072
64+
DATASET_READS: 0.0004
65+
DATASET_WRITES: 0.0002
66+
KEY_VALUE_STORE_READS: 0.0006
67+
KEY_VALUE_STORE_WRITES: 0.002
68+
KEY_VALUE_STORE_LISTS: 0.004
69+
REQUEST_QUEUE_READS: 0.005
70+
REQUEST_QUEUE_WRITES: 0.02
71+
DATA_TRANSFER_INTERNAL_GBYTES: 0.0004
72+
DATA_TRANSFER_EXTERNAL_GBYTES: 0.0002
73+
PROXY_RESIDENTIAL_TRANSFER_GBYTES: 0.16
74+
PROXY_SERPS: 0.0006
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
description: Not found - the requested resource was not found.
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../schemas/common/ErrorResponse.yaml
6+
examples:
7+
actor-not-found:
8+
summary: Actor was not found
9+
value:
10+
error:
11+
type: actor-not-found
12+
message: Actor was not found.
13+
record-not-found:
14+
summary: Actor run was not found
15+
value:
16+
error:
17+
type: record-not-found
18+
message: Actor run was not found

apify-api/openapi/components/tags.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@
8282
x-displayName: Last run - Introduction
8383
x-parent-tag-name: Actors
8484
x-legacy-doc-urls:
85-
- "#/reference/actors/last-run-object-and-its-storages"
86-
- "#tag/Actors/Actor runs/Last run"
85+
- "#/reference/actors/last-run-object-and-its-storages"
86+
- "#tag/Actors/Actor runs/Last run"
8787
x-trait: "true"
8888
description: |
89-
The API endpoints in this section let you retrieve and manage the last run of a given Actor
90-
and its default storages (dataset, key-value store, request queue, log).
89+
The API endpoints in this section let you retrieve and manage the last run of a given Actor
90+
and its default storages (dataset, key-value store, request queue, log).
9191
9292
- name: Actors/Webhook collection
9393
x-displayName: Webhook collection - Introduction

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs@last.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ get:
143143
PROXY_SERPS: 0.0006
144144
"400":
145145
$ref: ../../components/responses/BadRequest.yaml
146+
"404":
147+
description: Not found - the requested resource was not found.
148+
content:
149+
application/json:
150+
schema:
151+
$ref: ../../components/schemas/common/ErrorResponse.yaml
152+
examples:
153+
actor-not-found:
154+
$ref: ../../components/examples/actor-not-found.yaml
155+
actor-run-not-found:
156+
$ref: ../../components/examples/actor-run-not-found.yaml
146157
deprecated: false
147158
x-legacy-doc-urls:
148159
- https://docs.apify.com/api/v2#/reference/actor-tasks/last-run-object-and-its-storages

0 commit comments

Comments
 (0)