Added debugging for ticket generation
This commit is contained in:
@ -101,6 +101,10 @@ class SystemHealthMonitor:
|
|||||||
"type": issue_type
|
"type": issue_type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Debug: Log the ticket payload being sent
|
||||||
|
print("Attempting to create ticket with payload:")
|
||||||
|
print(json.dumps(ticket_payload, indent=4))
|
||||||
|
|
||||||
# Attempt to create the ticket via the API
|
# Attempt to create the ticket via the API
|
||||||
try:
|
try:
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
@ -108,6 +112,11 @@ class SystemHealthMonitor:
|
|||||||
json=ticket_payload,
|
json=ticket_payload,
|
||||||
headers={'Content-Type': 'application/json'}
|
headers={'Content-Type': 'application/json'}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Debug: Log the response from the server
|
||||||
|
print(f"Response status code: {response.status_code}")
|
||||||
|
print(f"Response body: {response.text}")
|
||||||
|
|
||||||
if response.status_code in [200, 201]:
|
if response.status_code in [200, 201]:
|
||||||
print(f"Ticket created successfully: {ticket_title}")
|
print(f"Ticket created successfully: {ticket_title}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user