`err` is not handled. If there is no branch found in the database you are simply redirected to the project page. This should probably be a 404 instead.