Skip to content

Return 500 on resolution errors#380

Merged
lidel merged 1 commit intomainfrom
go-libipfs/185
Feb 28, 2023
Merged

Return 500 on resolution errors#380
lidel merged 1 commit intomainfrom
go-libipfs/185

Conversation

@hacdias
Copy link
Member

@hacdias hacdias commented Feb 27, 2023

- [`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) can be used for remaining traversal errors caused by invalid or unsupported DAG types.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, 400 is removed for path resolution purposes. There are still 400s, but for other use-cases (invalid headers, invalid format requested, etc).

@lidel lidel merged commit 80db667 into main Feb 28, 2023
@lidel lidel deleted the go-libipfs/185 branch February 28, 2023 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants