Project

General

Profile

Bug #7306

Sometimes in the API, we find_by_id and fail when other times we just call find

Added by David Davis over 5 years ago. Updated 9 months ago.

Status:
Rejected
Priority:
Low
Assignee:
-
Category:
API
Target version:
-
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

History

#1 Updated by Brad Buckingham over 5 years ago

The following is an example where this was observed:

api/v2/packages_controller.rb:

def find_repository
@repo = Repository.find(params[:repository_id])
fail HttpErrors::NotFound, _("Couldn't find repository '%s'") % params[:repository_id] if @repo.nil?
end

api/v2/errata_controller.rb:

def find_repository
@repo = Repository.find(params[:repository_id]) if params[:repository_id]
end

#2 Updated by Eric Helms over 5 years ago

  • Triaged changed from No to Yes

#3 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) set to 114

#4 Updated by John Mitsch 9 months ago

  • Target version deleted (Katello Backlog)
  • Status changed from New to Rejected

Thanks for reporting this issue. This issue was created over 4 years ago and hasn't seen an update in 1 year. We are closing this in an effort to keep a realistic backlog. Please open up a new issue that includes a link to this issue if you feel this still needs to be addressed. We can then triage the new issue and reassess.

Also available in: Atom PDF