added return type check of storage.insert_into_tbl()
added return type check of storage.insert_into_tbl()
Only If data type is 'dict' the error check can proceed
@@ -59,7 +59,9 @@ class AuditLogger(AuditLoggerSingleton):
# Get the JSON result of the insert
out_data = self._storage.insert_into_tbl("log", payload)
- # Is error message present
+ # Check if storage output is a dict (JSION data)
+ if type(out_data) is dict:
+ # Is error message present ?
err_msg = out_data.get('message', None)
# Raise a Exception
