@@ -10,7 +10,7 @@ def get_time_off(event, context):
1010 try :
1111 # Define the mock API endpoint URL (hardcoding `host.docker.internal` for now)
1212 # url = "http://wiremock.localhost.localstack.cloud:8080/company/time-offs/534813865"
13- url = "http://host.docker.internal :8080/company/time-offs/534813865"
13+ url = "http://ls-wiremock :8080/company/time-offs/534813865"
1414
1515 # Make a GET request to the mock API
1616 response = requests .get (url , timeout = 5 )
@@ -41,6 +41,7 @@ def get_time_off(event, context):
4141 "message" : "Could not connect to the downstream HR service." ,
4242 "error" : str (e ),
4343 }
44+ print ("Error:" , error_message )
4445 return {
4546 "statusCode" : 503 , # Service Unavailable
4647 "headers" : {"Content-Type" : "application/json" },
@@ -49,6 +50,7 @@ def get_time_off(event, context):
4950 except Exception as e :
5051 # Handle other unexpected errors (e.g., JSON parsing issues, programming errors)
5152 error_message = {"message" : "An unexpected error occurred." , "error" : str (e )}
53+ print ("Error:" , error_message )
5254 return {
5355 "statusCode" : 500 , # Internal Server Error
5456 "headers" : {"Content-Type" : "application/json" },
0 commit comments