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

Incorrect response code on missing pages #1103

Open
terussell85 opened this issue Dec 2, 2024 · 1 comment
Open

Incorrect response code on missing pages #1103

terussell85 opened this issue Dec 2, 2024 · 1 comment

Comments

@terussell85
Copy link

terussell85 commented Dec 2, 2024

When using the Reader API on missing pages, the JSON response returns code:200. I would expect it to return the HTTP status code received from the server, which would be 404 in the example.

Request

curl https://r.jina.ai/https://news.ycombinator.com/foo-bar \
  -H "Accept: application/json"

Response

{
  "code": 200,
  "status": 20000,
  "data": {
    "warning": "Target URL returned error 404: Not Found",
    "title": "",
    "description": "",
    "url": "https://news.ycombinator.com/foo-bar",
    "content": "Unknown.",
    "usage": {
      "tokens": 2
    }
  }
}
@jjroelofs
Copy link

This is a must-have feature for our implementation of Jina, wonder if this is a recent regression, or nobody noticed before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants