I would like to know if the HTTP error code 412
is used correctly on our RESTful api.
We have one URL which regenerates some data on request, and it has some logic in the server-side to check internally if there is nothing new to regenerate it will retrieve 412
status code. If there are some changes on server it will regenerate data and it will retrieve 200
status code.
I am thinking that 412
is not a good choice for error, because the condition checking is happening in server-side internally. So I think that using status code 200
for both cases would be probably a better approach. Finally the URL would respond with JSON which would contain data about the generation status.