conjure-java-runtime icon indicating copy to clipboard operation
conjure-java-runtime copied to clipboard

Why are SafeIllegalArgumentExceptions 400s?

Open TheBeruriahIncident opened this issue 5 years ago • 0 comments

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.

TheBeruriahIncident avatar Nov 04 '19 13:11 TheBeruriahIncident