Skip to content

Commit d551c94

Browse files
committed
docs(routing): clarify DHT API is optional, accept 404 or 501
1 parent 3bfb193 commit d551c94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/routing/http-routing-v1.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ The content body must be a [`application/vnd.ipfs.ipns-record`][application/vnd.
261261

262262
## DHT Routing API
263263

264+
The DHT Routing API is OPTIONAL. Implementations that do not support DHT operations MAY return `404` (Not Found) or `501` (Not Implemented) as specified in [Error Codes](#error-codes).
265+
264266
### `GET /routing/v1/dht/closest/peers/{key}`
265267

266268
This optional endpoint allows light clients to lower the cost of DHT walks in browser contexts.
@@ -278,6 +280,7 @@ This optional endpoint allows light clients to lower the cost of DHT walks in br
278280
- `200` (OK): the response body contains peer records.
279281
- `404` (Not Found): must be returned if no matching records are found.
280282
- `422` (Unprocessable Entity): request does not conform to schema or semantic constraints.
283+
- `501` (Not Implemented): may be returned if DHT operations are not supported.
281284

282285
#### Response Headers
283286

0 commit comments

Comments
 (0)