Skip to content

Throw not found exception on unknown instance #338

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

Merged
merged 1 commit into from
Nov 1, 2018

Conversation

bobvandevijver
Copy link
Contributor

@bobvandevijver bobvandevijver commented Oct 31, 2018

Current behaviour is a PHP warning as url input is not correctly checkec, which results in an error page during development, but a white 200 OK response on production.

When catching this early with a NotFoundException, it is clear that the instance does not exist.

This change adds two major improvements:

  • During development there will be a Symfony error page with a "Instance not found" instead of a "Notice: Undefined index: ".
  • The user on production will be presented with an accurate 404 not found page, which can be customized by the application (instead of a 200 OK page with some random content, but white result).
Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT

Note, this is the rebased version of #303, as I got no response there and the source has changed.

I believe a NotFoundException should be thrown when a instance is not found, instead of a possible PHP error.
@helios-ag helios-ag merged commit 7b11fb1 into helios-ag:master Nov 1, 2018
@helios-ag
Copy link
Owner

Thanks

@bobvandevijver bobvandevijver deleted the 404-instance-not-found branch April 13, 2020 12:23
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

Successfully merging this pull request may close these issues.

2 participants