Project

General

Profile

Bug #2179

Wrong owner_type on the request returns 500

Added by Daniel Lobato Garcia about 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Low
Category:
API
Target version:
Difficulty:
easy
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Hi all,

This request:

Parameters: {"id"=>"4777", "host"=>{"owner_id"=>1, "owner_type"=>"UserGroup"}}
Authorized user user (Name Lastname)
Operation FAILED: uninitialized constant UserGroup
Completed 500 Internal Server Error in 341ms

Should return a 400 (bad request) instead of the 500 (Internal server error) it currently returns.

Associated revisions

Revision 7fcb314e (diff)
Added by Daniel Lobato Garcia over 9 years ago

fixes #2179 - validate the owner type, preventing the API returning errors for a wrong owner_type

History

#1 Updated by Daniel Lobato Garcia about 10 years ago

Working on it.

#2 Updated by Dominic Cleal over 9 years ago

  • Description updated (diff)
  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Target version set to 1.3.0

#3 Updated by Daniel Lobato Garcia over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF