Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 500 on no results #58

Closed
lidel opened this issue Apr 8, 2024 · 2 comments · Fixed by #60
Closed

HTTP 500 on no results #58

lidel opened this issue Apr 8, 2024 · 2 comments · Fixed by #60
Assignees
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@lidel
Copy link
Member

lidel commented Apr 8, 2024

Problem

When requesting non-streaming response type (application/json),
/routing/v1/peers returns HTTP 500 instead of 404.

This in turn makes our infra swap payload into text/html error response.

Example:

Solution

According to current specs, we should return HTTP 404:
Ref. https://specs.ipfs.tech/routing/http-routing-v1/#response-status-codes-0

Assuming a bug?

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Apr 8, 2024
@hacdias
Copy link
Member

hacdias commented Apr 12, 2024

This is a bug... in Boxo. I will take care of it.

@hacdias
Copy link
Member

hacdias commented Apr 12, 2024

@lidel ipfs/boxo#601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants