foundersandcoders / open-tourism-platform

An open platform to facilitate the creation of apps to promote local tourism and business in Nazareth
MIT License
17 stars 3 forks source link

no unauthorized error thrown if resource id is invalid #165

Open m4v15 opened 6 years ago

m4v15 commented 6 years ago

if the resource Id in the URL is invalid it now gets thrown here (when the trying to access the resource to identify the owner) so it doesn't throw an unauthorised error, even if the user is unauthorised (as this happens before it is certain if the user is authed or not).

I actually guess that's not a problem, but it just made rewriting the tests confusing for a bit so just wanted to flag it up.

We may also now have some unnecessary error messages/uses of them in the controllers.