Log errors in ApiViews when an error is present in the result

1 parent 0505dde9
...@@ -131,6 +131,9 @@ class ApiViews(APIView): ...@@ -131,6 +131,9 @@ class ApiViews(APIView):
# if k in url and v: # if k in url and v:
# link = "/".join([self.home, nik_url, v]) # link = "/".join([self.home, nik_url, v])
# d[k] =f'<a href="{link}" target="_blank">View</a>' # d[k] =f'<a href="{link}" target="_blank">View</a>'
if result.get("error"):
_log.error(result.get("error"))
_log.error(str(result))
return result return result
def not_found(self, msg=None): def not_found(self, msg=None):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!