mirror of https://github.com/MISP/misp-modules
fix: Fixed type of the result in case of exception
- Set as str since some exception types are not jsonablepull/266/head
parent
1b44668094
commit
b778dd5e67
|
@ -49,7 +49,7 @@ def handler(q=False):
|
||||||
query_result = resolver.query(query, 'A')[0]
|
query_result = resolver.query(query, 'A')[0]
|
||||||
result = "{} - {}".format(requested_value, dbl_mapping[str(query_result)])
|
result = "{} - {}".format(requested_value, dbl_mapping[str(query_result)])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
result = e
|
result = str(e)
|
||||||
return {'results': [{'types': mispattributes.get('output'), 'values': result}]}
|
return {'results': [{'types': mispattributes.get('output'), 'values': result}]}
|
||||||
|
|
||||||
def introspection():
|
def introspection():
|
||||||
|
|
Loading…
Reference in New Issue