Throw http not found exception instead of runtime

Avoids a 500 server error.
Merge pull request #1922 from EmmanuelVella/patch-17

Throw http not found exception instead of runtime