Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !7984

Closed
Created Oct 07, 2014 by Administrator@rootOwner
  • Report abuse
Report abuse

404 instead of 500 on inexistent paths for tree edit and blame show [failure unrelated]

  • Overview 5
  • Commits 1
  • Changes 8

Created by: cirosantilli

Edit and blame on inexistent paths was giving 500 where it should be 404.

Live examples:

  • https://gitlab.com/cirosantilli/test0/blame/master/README.mdqwer
  • https://gitlab.com/cirosantilli/test0/edit/master/README.mdqwer

This was working for blob, tree and raw views.

Implementation: use the same mechanism currently used on the blob controller on all others by moving it to the parent Projects::ApplicationController.

The real cause of this however, is that the current controller design is bad IMHO: blame, raw and edit should be different actions of a single controller blob controller: this would make it easier to have uniformity.

The only reason they are not is probably because the :id can contain slashes which makes it harder to write DRY routes. See: http://stackoverflow.com/questions/26223317/how-to-put-a-member-of-a-routing-resource-outside-of-its-parent-namespace . But I'd rather have non DRY routes instead of non DRY controllers.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/cirosantilli/edit-tree-500