innoq / statuses

statuses
Apache License 2.0
13 stars 14 forks source link

URL of Deletes Status gives Nullpointer Exception #145

Closed martinei closed 9 years ago

martinei commented 9 years ago

If one creates a Update and later removes it the url should says somehtingh like "This Update was deleted". Currently it renderes a Nullpointer. Since URLs a propagated via RSS + Mail we must keep those URI alive event after deletion.

mvitz commented 9 years ago

Applies to not yet used IDs, too. I guess we should return a 404 instead of a NPE.

aheusingfeld commented 9 years ago

I'd return an HTTP 410 Gone. ;)

mvitz commented 9 years ago

How do you decide if the resource was once there? We would need to keep a list of previously used IDs just to decide between 404 and 410...

tloist commented 9 years ago

That's an easy one: Go for Soft deletion! :grinning:

mvitz commented 9 years ago

Maybe I'm to pragmatic but just to decide between 404 and 410?

tloist commented 9 years ago

Maybe I should have used this emoji instead: :trollface:

Well, it depends on the storage solution, but I would avoid Soft deletion if there is not a business case for it. Personally I'm totally fine with a 404 not found.

martinei commented 9 years ago

Oh! And i was under the impression we are in the age of "keep everhtyingh" , don't save state but actions. Would a "deleted" Flag be that hard? The semantic difference between "you idiot that site does not exists" and "I'am sorry, someone took this down" is big enough to justifiy it. Just my 2c.