Project

General

Profile

Actions

Bug #12888

closed

exception handling during api call causes does not handle 'class' errors

Added by Justin Sherrill about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
trivial
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When testing a pr i noticed that if something like scoped search throws an error, you get anothe rexception.

To reproduce:

In app/models/product.rb, add:

scoped_search :on => :foo

and then search for products with "foo = bar":

http://devbox:3000/katello/api/v2/products?organization_id=1&search=foo=bar

Result:

undefined method `errors' for #<Class:0x00000007244490>

Actions

Also available in: Atom PDF