Skip to content

Commit

Permalink
adding logger to mock ims service to see why request isnt completing
Browse files Browse the repository at this point in the history
  • Loading branch information
rabellino-noaa committed Jun 27, 2024
1 parent 944a54e commit 94ae0e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/idsse_testing/ims_service/src/ims_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=missing-function-docstring,redefined-outer-name,protected-access
# pylint: disable=unused-argument, disable=duplicate-code
import json
import logging

from glob import glob
from os import path
Expand All @@ -23,9 +24,13 @@
# The joined profiles from the JSON examples...
ims_request = {'errors': [], 'profiles': []}

logger = logging.getLogger(__name__)

@app.route('/all_events', methods=['GET'])
@app.route('/all-events', methods=['GET'])
def profiles():
logger.info('Received GET request for all events, with headers: %s', request.headers)
logger.info(' request.args.keys are: %s', request.args.keys())

# First check for the key argument and that it matches the expected value...
if request.headers.get("X-Api-Key") != app.config['GSL_KEY']:
return jsonify({"message": "ERROR: Unauthorized"}), 401
Expand Down

0 comments on commit 94ae0e6

Please sign in to comment.