Skip to content

Commit

Permalink
fix: try to parse response before its return (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
levisingularity authored Nov 24, 2023
1 parent f0ff4d3 commit 7c9ba26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion das-query-engine/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@

def _response(http_code_response: int, result: str, context: any = None):
if context is None:
return result
try:
return json.loads(result)
except:
return result

return {
"statusCode": http_code_response,
Expand Down

0 comments on commit 7c9ba26

Please sign in to comment.