Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename RequestNotFoundException #641

Open
jowerner opened this issue Nov 28, 2018 · 2 comments
Open

Rename RequestNotFoundException #641

jowerner opened this issue Nov 28, 2018 · 2 comments

Comments

@jowerner
Copy link

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!

@jlannoy
Copy link
Contributor

jlannoy commented Jan 19, 2019

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.

@jowerner
Copy link
Author

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... :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants