Sporadic HTTP 400 on GET `/ids/<someId>`

Open
#137 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
api

Research direction

Start by reproducing the GET /disco/v3.0/ids/{someId} request with the reported package ID and compare repeated responses. Trace the endpoint's not-found handling and the source of the intermittent result; done means the behavior is understood and missing package IDs consistently return HTTP 404 rather than HTTP 400.

Written by the indexing model from the issue text.

Description

I sometimes get a 400 response with Package id not found. For instance:

GET https://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511
invalid: 400 Bad Request
Text: "{"result":[],"message":"Package id not found"}"

I see 2 problems here:

  1. I retried this same URL later and the package was found (so maybe it was a sporadic error?)
  2. For an ID that's not found, HTTP 404 would be more appropriate than HTTP 400
Dominant language
Java
Stars
154
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from foojayio/discoapi

All issues in foojayio/discoapi

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.