fix: Fixed type of the result in case of exception

- Set as str since some exception types are not
  jsonable
chrisr3d 2018-11-15 19:47:02 +01:00
parent ec9d78362c
commit f94adcada6
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ def handler(q=False):
query_result = resolver.query(query, 'A')[0]
result = "{} - {}".format(requested_value, dbl_mapping[str(query_result)])
except Exception as e:
result = e
result = str(e)
return {'results': [{'types': mispattributes.get('output'), 'values': result}]}
def introspection():