You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
subtitle: Configure retry behavior for endpoints using `x-fern-retries` extension
4
+
---
5
+
6
+
<Calloutintent="info">
7
+
The `x-fern-retries` extension is supported in Python SDKs only.
8
+
</Callout>
9
+
10
+
The `x-fern-retries` extension configures retry behavior per endpoint in your OpenAPI specification, overriding any
11
+
retry settings configured by SDK users. Use it to disable retries for non-idempotent operations like payment
12
+
processing or order creation.
13
+
14
+
To disable retries for specific endpoints, set `disabled: true`.
15
+
16
+
```yaml title="openapi.yml" {4-5,15-16}
17
+
paths:
18
+
/plants/{plantId}:
19
+
get:
20
+
x-fern-retries:
21
+
disabled: true
22
+
operationId: get_plant
23
+
parameters:
24
+
- name: plantId
25
+
in: path
26
+
required: true
27
+
schema:
28
+
type: string
29
+
/plants:
30
+
post:
31
+
x-fern-retries:
32
+
disabled: true
33
+
operationId: create_plant
34
+
requestBody:
35
+
required: true
36
+
content:
37
+
application/json:
38
+
schema:
39
+
type: object
40
+
properties:
41
+
name:
42
+
type: string
43
+
species:
44
+
type: string
45
+
responses:
46
+
'201':
47
+
description: Plant created successfully
48
+
```
49
+
50
+
When retries are disabled at the endpoint level, the generated SDK won't retry failed requests to that endpoint, regardless of the SDK's user custom configuration.
0 commit comments