palantir / palantir/conjure-java-runtime
Why are SafeIllegalArgumentExceptions 400s?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 95
- Forks
- 96
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 33
Description
Now that we push for using the logsage preconditions everywhere, this means that random bugs deep in the code will effectively cause 400s. The philosophy elsewhere on our api seems to be intentionality and being very careful about what we expose, etc
Additionally, it's kind of subtle and confusing that checkState is a 500 and checkArgument is a 400, even when they have nothing to do with a direct client input.
What happened?
checkArgument causes 400s even when having nothing to do with client issues
What did you want to happen?
Only getting 400s from client issues. Presumably we should have to be explicit about what's a 400 (this is currently true in most other cases).
Essentially, I propose that there's not an exception mapper for this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how SafeIllegalArgumentException and checkArgument are handled by the API's exception mapping. Confirm where 400 responses are produced and identify the existing explicit paths for client errors. Done means unrelated internal failures no longer become 400s, while intentional client-error handling remains explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100