tuupola / slim-api-skeleton

Slim 3 API skeleton project for Composer
MIT License
312 stars 62 forks source link

Probably a typo error #23

Closed llaville closed 7 years ago

llaville commented 7 years ago

Mika,

In file slim-api-skeleton-master\routes\todos.php,

throw new PreconditionFailedException("Todo has been modified", 412);

As precondition failed, I suppose that the reason should be spelled "Todo has not been modified"

Laurent

tuupola commented 7 years ago

412 is thrown when somebody else already has modified the todo. This is to prevent overwriting changes if two clients are working on the same todo at the same time.

Other way to say this is that the reason for failing is that todo has already been modified.

llaville commented 7 years ago

I prefer (vote +1) for "todo has already been modified". More clear to understand what happened