Project

General

Profile

Actions

Bug #38653

closed

We get "undefined method" error when trying to show non-existent settings via id

Added by Arvind Jangir 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Description of problem:

When trying to show non-existent setting via hammer or API using it's id, we get
"undefined method" error.

How reproducible:
always

Steps to Reproduce:
1. On Foreman try: hammer settings info --id wrong_id
2. On Foreman try: curl -su admin:changeme https://$(hostname)/api/settings/wrong_id

Actual results:
1. undefined method `name' for nil:NilClass
2. {
"error": {"message":"undefined method `name' for nil:NilClass"}
}

Expected results:
Error: setting not found.

Actions #1

Updated by Arvind Jangir 5 months ago

  • Red Hat JIRA set to SAT-20238
Actions #2

Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/10644 added
Actions #3

Updated by The Foreman Bot 5 months ago

  • Fixed in Releases 3.17.0 added
Actions #4

Updated by Anonymous 5 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF