rest-guide icon indicating copy to clipboard operation
rest-guide copied to clipboard

Standardized Belgif problem type(s) for 409 Conflict

Open jpraet opened this issue 1 year ago • 3 comments

The Belgif REST Guidelines make various references to HTTP 409 Conflict:

But no standardized Belgif problem type is currently provided. It should probably use the InputValidationProblem model, so additional details can be returned in the issues property.

jpraet avatar May 21 '24 06:05 jpraet

We should probably change to http code 412 for optimistic locking scenarios; there's still open issue #37 for that. For the others, we'll need to evaluate if single level of problem suffices for most of these use cases vs more complex InputValidationProblem model that allows bundling of multiple issues.

pvdbosch avatar May 21 '24 07:05 pvdbosch

we'll need to evaluate if single level of problem suffices for most of these use cases vs more complex InputValidationProblem model that allows bundling of multiple issues.

Yes, that relates to the discussion on https://github.com/belgif/rest-guide/issues/114#issuecomment-1482464264.

jpraet avatar May 21 '24 07:05 jpraet

409 Conflict may also be used for PUT operation when a resource can't be updated bc of business rules; similar to the above DELETE scenario. Do we need a generic problem type for such business-specific cases or should it be an API-specific problem type?

pvdbosch avatar May 29 '24 12:05 pvdbosch

I've opened new issue #217 replacing this one, and also including cases like replacedSsin, mergedEnterprise, etcetera. It doesn't include optimistic locking, which is covered by #37.

pvdbosch avatar Jan 23 '25 12:01 pvdbosch