Skip to content

Commit

Permalink
Merge pull request #384 from ipfs/libipfs/issues/200
Browse files Browse the repository at this point in the history
docs: return 400 Bad Request on Invalid CIDs
  • Loading branch information
lidel authored Mar 27, 2023
2 parents 80db667 + 6afde87 commit a22c7c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http-gateways/PATH_GATEWAY.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,9 @@ Gateway MUST respond with HTTP error when it is not possible to traverse the req
- [`404 Not Found`](#404-not-found) should be returned when the root CID is valid and traversable, but
the DAG it represents does not include content path remainder.
- Error response body should indicate which part of immutable content path (`/ipfs/{cid}/path/to/file`) is missing
- [`400 Bad Request`](#400-bad-request) should be returned when the root CID under the `ipfs` namespace is invalid.
- [`500 Internal Server Error`](#500-internal-server-error) can be used for remaining traversal errors,
such as invalid CIDs, domains that cannot be resolved, or IPNS keys that cannot be resolved.
such as domains that cannot be resolved, or IPNS keys that cannot be resolved.

## Best practices for HTTP caching

Expand Down

0 comments on commit a22c7c3

Please sign in to comment.