ninja icon indicating copy to clipboard operation
ninja copied to clipboard

Rename RequestNotFoundException

Open jowerner opened this issue 7 years ago • 2 comments

In order to trigger a 404 error page from my controller, I can throw a RequestNotFoundException. This works fine, but the naming of this exception is a bit misleading. What do you think about renaming it to ResourceNotFoundException?

Thanks!

jowerner avatar Nov 28 '18 14:11 jowerner

The other exceptions are "ForbiddenRequest" and "BadRequest", so it makes sense to have such "RequestNotFound"... In my opinion, a "resource" would more be referencing an asset if you are building a web application.

But even if we would agree, we cannot just rename such a class. We have to introduce the new one, deprecate the older one, document the migration between both, maintain both during a certain time, then clean the old class.

jlannoy avatar Jan 19 '19 10:01 jlannoy

It's just a feeling of mine that RequestNotFoundException might be the wrong term here. In the end, it is not the request that could not be found, but the requested resource. And since in the Web all URLs locate resources, I thought that ResourceNotFoundException might be a good name.

And yes, such a change would unfortunately require all the steps you mentioned... :-(

jowerner avatar Jan 22 '19 18:01 jowerner