Repository navigation
Expand file tree
/
Copy patherrors.json
More file actions
364 lines (364 loc) · 17.6 KB
/
Copy patherrors.json
File metadata and controls
364 lines (364 loc) · 17.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
{
"errors": [
{
"code": "invalid_params",
"http": 400,
"charged": false,
"retry": "after_fix",
"message": "A parameter is invalid",
"message_zh": "参数不合法",
"meaning": "A parameter is missing, has the wrong type or value, or the method is wrong. problems lists each one; param names the first.",
"meaning_zh": "参数缺失、类型或取值不对,或者请求方法不对。problems 列出每一处问题,param 是第一个出错的参数。",
"fix": "Fix what problems says, then send the request again.",
"fix_zh": "按 problems 改好再发。",
"docs_url": "https://okdata.online/docs/errors/#invalid_params"
},
{
"code": "max_price_exceeded",
"http": 400,
"charged": false,
"retry": "after_fix",
"message": "This call could cost more than the price cap allows",
"message_zh": "这次调用可能超过你设的价格上限",
"meaning": "The most this call could cost (required) is above X-Max-Price (or max_price), so it did not run.",
"meaning_zh": "这次调用最多可能花的钱(required)超过了 X-Max-Price(或 max_price),所以没有执行。",
"fix": "Raise the cap to at least required, ask for fewer items, or leave the cap out.",
"fix_zh": "把上限调到 required 以上、少要一些条目,或者不设上限。",
"docs_url": "https://okdata.online/docs/errors/#max_price_exceeded"
},
{
"code": "cursor_invalid",
"http": 400,
"charged": false,
"retry": "no",
"message": "The cursor does not exist",
"message_zh": "这个 cursor 不存在",
"meaning": "The cursor is not one this API issued, or it was issued to another account.",
"meaning_zh": "这个 cursor 不是我们发出的,或者是发给别的账户的。",
"fix": "Send page.next_cursor exactly as it came, or start the listing again without a cursor.",
"fix_zh": "把 page.next_cursor 原样传回,或者不带 cursor 从头开始。",
"docs_url": "https://okdata.online/docs/errors/#cursor_invalid"
},
{
"code": "cursor_mismatch",
"http": 400,
"charged": false,
"retry": "after_fix",
"message": "The cursor belongs to another request",
"message_zh": "这个 cursor 属于另一个请求",
"meaning": "The cursor was sent to another endpoint, or with other parameters than the page it came from (view and fields may change).",
"meaning_zh": "cursor 发到了别的接口,或者参数和它所在那一页不一样(view 和 fields 可以变)。",
"fix": "Resend with the endpoint and parameters of the page it came from.",
"fix_zh": "用它所在那一页的接口和参数重新发。",
"docs_url": "https://okdata.online/docs/errors/#cursor_mismatch"
},
{
"code": "unauthorized",
"http": 401,
"charged": false,
"retry": "no",
"message": "No credential was sent, or it is invalid, disabled or expired",
"message_zh": "没有带凭证,或凭证无效、已停用、已过期",
"meaning": "The key is missing, malformed, revoked, disabled or expired (reason says which when known).",
"meaning_zh": "Key 缺失、格式不对、已撤销、已停用或已过期(知道原因时 reason 会写明)。",
"fix": "Send Authorization: Bearer <key> with a live key; next_step says where to get one.",
"fix_zh": "带上 Authorization: Bearer <key>,用有效的 key;next_step 写了去哪里拿。",
"docs_url": "https://okdata.online/docs/errors/#unauthorized"
},
{
"code": "insufficient_balance",
"http": 402,
"charged": false,
"retry": "after_fix",
"message": "The balance is too low",
"message_zh": "余额不足",
"meaning": "The balance (available) cannot cover the most this call could cost (required).",
"meaning_zh": "余额(available)不够这次调用的最高费用(required)。",
"fix": "Top up at top_up_url, then send the same request again, unchanged.",
"fix_zh": "到 top_up_url 充值,到账后把同一个请求原样再发一次。",
"docs_url": "https://okdata.online/docs/errors/#insufficient_balance"
},
{
"code": "key_budget_exceeded",
"http": 402,
"charged": false,
"retry": "after_fix",
"message": "This key has reached its spending limit",
"message_zh": "这个 Key 已到花费上限",
"meaning": "This call would take the key past its daily, monthly or total spending limit (reason says which).",
"meaning_zh": "这次调用会超出这个 key 的每日、每月或总额花费上限(reason 说明是哪个)。",
"fix": "Wait for the day or month to turn (UTC), raise the limit in the console, or use another key.",
"fix_zh": "等到下一天或下个月(UTC),在控制台调高上限,或换一个 key。",
"docs_url": "https://okdata.online/docs/errors/#key_budget_exceeded"
},
{
"code": "account_suspended",
"http": 403,
"charged": false,
"retry": "no",
"message": "This account is suspended",
"message_zh": "这个账号已停用",
"meaning": "The account this key belongs to is suspended, so none of its keys work.",
"meaning_zh": "这个 key 所属的账号已停用,账号下的 key 都不能用。",
"fix": "Write to hello@okdata.online.",
"fix_zh": "发邮件到 hello@okdata.online。",
"docs_url": "https://okdata.online/docs/errors/#account_suspended"
},
{
"code": "key_scope_denied",
"http": 403,
"charged": false,
"retry": "no",
"message": "This key may not call this endpoint",
"message_zh": "这个 Key 不能调用这个接口",
"meaning": "This key may not call this endpoint (its scope leaves it out).",
"meaning_zh": "这个 key 的可用范围里没有这个接口。",
"fix": "Use a key whose scope includes it, or widen the scope in the console.",
"fix_zh": "换一个包含这个接口的 key,或在控制台放宽它的范围。",
"docs_url": "https://okdata.online/docs/errors/#key_scope_denied"
},
{
"code": "unknown_endpoint",
"http": 404,
"charged": false,
"retry": "no",
"message": "There is no such endpoint",
"message_zh": "没有这个接口",
"meaning": "No endpoint lives at that path. When the path is close to one that does, moved_to (or suggestion) names it.",
"meaning_zh": "这个路径下没有接口。路径和某个接口很接近时,moved_to(或 suggestion)会给出正确的路径。",
"fix": "Use moved_to when given; otherwise check the id against the catalog (the path is the id with dots turned into slashes under /v1).",
"fix_zh": "有 moved_to 就用它;否则对照目录检查 id(路径是 /v1 加上把点换成斜杠的 id)。",
"docs_url": "https://okdata.online/docs/errors/#unknown_endpoint"
},
{
"code": "not_found",
"http": 404,
"charged": false,
"retry": "no",
"message": "The platform says this does not exist or is not public",
"message_zh": "平台上没有这个内容,或不公开",
"meaning": "The post, account or page does not exist or is not public. Endpoints whose charge_when_not_found is above 0 charge this answer (the source billed us for it): the body then says charged: true and amount.",
"meaning_zh": "内容、账号或页面不存在或不公开。charge_when_not_found 大于 0 的接口会对这个结果计费(数据源也向我们收了钱):这时返回体里 charged 为 true,并给出 amount。",
"fix": "Final answer; retrying will not change it.",
"fix_zh": "这是最终结果,重试也一样。",
"docs_url": "https://okdata.online/docs/errors/#not_found"
},
{
"code": "result_not_found",
"http": 404,
"charged": false,
"retry": "no",
"message": "There is no kept result for this request ID",
"message_zh": "这个请求号没有保留的结果",
"meaning": "No kept result for this request ID on this account (it failed, or was never made).",
"meaning_zh": "这个账号下没有这个请求号的结果(调用失败了,或从没发生)。",
"fix": "Check the request ID; only successful calls keep a result.",
"fix_zh": "核对请求号;只有成功的调用会保留结果。",
"docs_url": "https://okdata.online/docs/errors/#result_not_found"
},
{
"code": "idempotency_conflict",
"http": 409,
"charged": false,
"retry": "after_fix",
"message": "This idempotency key was used for a different request",
"message_zh": "这个幂等键已用于另一个请求",
"meaning": "This Idempotency-Key was used in the last 24 h for a different request.",
"meaning_zh": "这个 Idempotency-Key 在 24 小时内已用于另一个请求。",
"fix": "Use a new key for a new request.",
"fix_zh": "新请求用新的 key。",
"docs_url": "https://okdata.online/docs/errors/#idempotency_conflict"
},
{
"code": "call_in_progress",
"http": 409,
"charged": false,
"retry": "same_key",
"message": "A call with this idempotency key is still running",
"message_zh": "带这个幂等键的调用还在进行",
"meaning": "A call with this Idempotency-Key is still running.",
"meaning_zh": "带这个 Idempotency-Key 的调用还在进行。",
"fix": "Retry in a moment with the same key; you get its result, charged once.",
"fix_zh": "稍后用同一个 key 重试,拿到它的结果,只扣一次费。",
"docs_url": "https://okdata.online/docs/errors/#call_in_progress"
},
{
"code": "cursor_expired",
"http": 410,
"charged": false,
"retry": "no",
"message": "The cursor has expired",
"message_zh": "这个 cursor 已过期",
"meaning": "The cursor is older than the endpoint's cursor lifetime (page.cursor_expires_at said when).",
"meaning_zh": "cursor 超过了这个接口的有效期(page.cursor_expires_at 写了到期时间)。",
"fix": "Start the listing again without a cursor, and skip the ids you already have.",
"fix_zh": "不带 cursor 从头开始,跳过已经拿到的 id。",
"docs_url": "https://okdata.online/docs/errors/#cursor_expired"
},
{
"code": "result_expired",
"http": 410,
"charged": false,
"retry": "no",
"message": "The result is older than 24 hours and was deleted",
"message_zh": "结果已超过 24 小时,已删除",
"meaning": "The result is older than 24 hours and was deleted.",
"meaning_zh": "结果已超过 24 小时,已删除。",
"fix": "Call the endpoint again (charged as usual).",
"fix_zh": "重新调用接口(照常计费)。",
"docs_url": "https://okdata.online/docs/errors/#result_expired"
},
{
"code": "rate_limited",
"http": 429,
"charged": false,
"retry": "yes",
"message": "Too many requests, or too many calls in progress",
"message_zh": "请求太多,或同时进行的调用太多",
"meaning": "The account sent too many requests this minute (reason: rate) or has too many calls running (reason: concurrency).",
"meaning_zh": "账号这一分钟请求太多(reason: rate),或同时进行的调用太多(reason: concurrency)。",
"fix": "Wait retry_after_seconds (or for a running call to end), then send the same request.",
"fix_zh": "等 retry_after_seconds 秒(或等进行中的调用结束),再发同一个请求。",
"docs_url": "https://okdata.online/docs/errors/#rate_limited"
},
{
"code": "cost_cap_exceeded",
"http": 429,
"charged": false,
"retry": "yes",
"message": "The account reached its daily spending allowance",
"message_zh": "账号今天的花费已到每日上限",
"meaning": "The account reached its daily spending allowance.",
"meaning_zh": "账号今天的花费已到每日上限。",
"fix": "Wait retry_after_seconds (the next UTC day), or write to us to raise it.",
"fix_zh": "等 retry_after_seconds 秒(下一个 UTC 日),或联系我们调高。",
"docs_url": "https://okdata.online/docs/errors/#cost_cap_exceeded"
},
{
"code": "uncharged_cost_limit",
"http": 429,
"charged": false,
"retry": "yes",
"message": "Too many uncharged calls today",
"message_zh": "今天不扣费的调用太多了",
"meaning": "Too many uncharged calls (nothing found) today.",
"meaning_zh": "今天没扣费的调用(查无结果)太多了。",
"fix": "Check the ids you send; it opens again at the next UTC day.",
"fix_zh": "检查发送的 id;下一个 UTC 日恢复。",
"docs_url": "https://okdata.online/docs/errors/#uncharged_cost_limit"
},
{
"code": "settlement_unknown",
"http": 500,
"charged": null,
"retry": "same_key",
"message": "The data came back, but whether it was charged is not known yet",
"message_zh": "数据已返回,但还不知道是否扣费",
"meaning": "The data came back, but the charge could not be confirmed.",
"meaning_zh": "数据已返回,但没能确认是否扣费。",
"fix": "Resend with the same Idempotency-Key to get the result without paying again, or look it up at /v1/calls/{request_id}.",
"fix_zh": "带同一个 Idempotency-Key 重发,拿到结果且不会再扣费;或在 /v1/calls/{request_id} 查询。",
"docs_url": "https://okdata.online/docs/errors/#settlement_unknown"
},
{
"code": "internal_error",
"http": 500,
"charged": false,
"retry": "yes",
"message": "Something went wrong on our side; nothing was charged",
"message_zh": "我们这边出错了,没有扣费",
"meaning": "Something went wrong on our side; nothing was charged.",
"meaning_zh": "我们这边出错了,这次没有扣费。",
"fix": "Retry with backoff.",
"fix_zh": "退避后重试。",
"docs_url": "https://okdata.online/docs/errors/#internal_error"
},
{
"code": "upstream_failed",
"http": 502,
"charged": false,
"retry": "yes",
"message": "No result came back this time and nothing was charged; retry shortly",
"message_zh": "这次没有取到结果,没有扣费,可以稍后重试",
"meaning": "Every data source for this endpoint failed on this request.",
"meaning_zh": "这个接口的所有数据源这次都失败了。",
"fix": "Retry with backoff; check the status page if it persists.",
"fix_zh": "退避后重试;持续失败就看状态页。",
"docs_url": "https://okdata.online/docs/errors/#upstream_failed"
},
{
"code": "cursor_unavailable",
"http": 502,
"charged": false,
"retry": "yes",
"message": "The source of this cursor is not available right now",
"message_zh": "这个 cursor 对应的数据源暂时不可用",
"meaning": "Only the source that served the previous page can continue it, and it is not available right now.",
"meaning_zh": "只有返回上一页的数据源能接着翻,它现在不可用。",
"fix": "Retry later with the same cursor, or start the listing again without one.",
"fix_zh": "稍后用同一个 cursor 重试,或者不带 cursor 从头开始。",
"docs_url": "https://okdata.online/docs/errors/#cursor_unavailable"
},
{
"code": "upstream_busy",
"http": 503,
"charged": false,
"retry": "yes",
"message": "The data sources are busy; nothing was charged, retry shortly",
"message_zh": "数据源繁忙,没有扣费,可以稍后重试",
"meaning": "Every data source for this endpoint is saturated.",
"meaning_zh": "这个接口的所有数据源都在满负荷。",
"fix": "Retry with backoff.",
"fix_zh": "退避后重试。",
"docs_url": "https://okdata.online/docs/errors/#upstream_busy"
},
{
"code": "capability_paused",
"http": 503,
"charged": false,
"retry": "yes",
"message": "This endpoint is paused",
"message_zh": "这个接口已暂停",
"meaning": "This endpoint is paused right now; nothing ran.",
"meaning_zh": "这个接口暂时停用了,这次没有执行。",
"fix": "Check /v1/catalog/status and retry once it is back.",
"fix_zh": "看 /v1/catalog/status,恢复后再调用。",
"docs_url": "https://okdata.online/docs/errors/#capability_paused"
},
{
"code": "timeout",
"http": 504,
"charged": false,
"retry": "yes",
"message": "The data did not arrive in time; nothing was charged",
"message_zh": "数据没有及时返回,没有扣费",
"meaning": "The data did not come back in time. The hold was released, so nothing was charged.",
"meaning_zh": "数据没有及时返回。预扣已退回,这次没有扣费。",
"fix": "Retry; an Idempotency-Key keeps a retry from ever being charged twice.",
"fix_zh": "直接重试;带 Idempotency-Key 重试,永远不会重复扣费。",
"docs_url": "https://okdata.online/docs/errors/#timeout"
}
],
"retry": {
"no": {
"en": "no",
"zh": "不要重试"
},
"yes": {
"en": "yes",
"zh": "可以重试"
},
"once": {
"en": "once more",
"zh": "可以再试一次"
},
"after_fix": {
"en": "after a fix",
"zh": "修正后重试"
},
"same_key": {
"en": "with the same Idempotency-Key",
"zh": "用同一个 Idempotency-Key 重试"
}
}
}