Stop logging API not found as ERROR
Currently if the user requests and object that is not found the API will log this as an "ERRROR" level message. This patch changes this to be a debug message as lookup of objects that have been deleted is a normal occurrence. Change-Id: I4e0db4b05b8636c40a62928e0b462ae73236eea0
This commit is contained in:
parent
13eab152fb
commit
58b7d9a039
@ -58,8 +58,8 @@ class BaseController(rest.RestController):
|
||||
"""Gets an object from the database and returns it."""
|
||||
db_obj = repo.get(session, id=id, show_deleted=show_deleted)
|
||||
if not db_obj:
|
||||
LOG.exception('%(name)s %(id)s not found',
|
||||
{'name': data_model._name(), 'id': id})
|
||||
LOG.debug('%(name)s %(id)s not found',
|
||||
{'name': data_model._name(), 'id': id})
|
||||
raise exceptions.NotFound(
|
||||
resource=data_model._name(), id=id)
|
||||
return db_obj
|
||||
|
Loading…
Reference in New Issue
Block a user