Skip to content

Commit

Permalink
Fix the argument of UnknownArgument exception
Browse files Browse the repository at this point in the history
This change sets the real UnknownArgument instead of the last
valid one in the exception raised by the API.

Fixes bug #1201839

Change-Id: I22e1dadbe9a90e03e8ccfbcc6e0e8dc3f17c5a3e
  • Loading branch information
Mehdi Abaakouk committed Jul 16, 2013
1 parent f7187a4 commit 384617f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ceilometer/api/controllers/v2.py
Expand Up @@ -213,8 +213,7 @@ def _query_to_kwargs(query, db_func):
if trans:
for k in trans:
if k not in valid_keys:
raise wsme.exc.UnknownArgument(i.field,
"unrecognized query field")
raise wsme.exc.UnknownArgument(k, "unrecognized query field")
kwargs[k] = trans[k]

return kwargs
Expand Down

0 comments on commit 384617f

Please sign in to comment.