Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanarik committed Sep 9, 2024
1 parent 3fdb185 commit 282d01d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@
def spotbot(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')

req_body = req.get_json()
req_body = {}

try:
req_body = req.get_json()
logging.info(f"Received JSON: {req_body}")
except ValueError:
logging.error('Invalid JSON received')
return func.HttpResponse("Invalid JSON", status_code=400)

fullCallsign = req_body.get('fullCallsign', 'Unknown')
source = req_body.get('source', 'Unknown')
frequency = req_body.get('frequency', 'Unknown')
Expand Down

0 comments on commit 282d01d

Please sign in to comment.