Improved
[V3 REST API] Client error code
6 months ago by Pilar Sterne
This change impacts thev3 REST APIs only (currently in open beta)
We've updated the V3 API framework to return informative HTTP status codes for client errors. Now if the resource you're trying to update isn't found, you'll get a 404. Or, if you try to create a container with the same barcode as an existing one in the same registry, you'll get a 409.
You'll still get a 400 code for bad requests, and you'll also get a 400 if there are multiple different kinds of client errors (e.g. try to create a container with a nonsense projectId and also the same barcode as an existing container).
Before this change: most client errors were returned with a 400 code, even when the underlying cause was something like insufficient permissions or not found.
