fix cf access login
This commit is contained in:
@@ -1245,10 +1245,22 @@ function handleWebhookTest($db) {
|
||||
'http_code' => $result['http_code']
|
||||
]);
|
||||
} else {
|
||||
$errorMsg = 'Webhook test failed: ';
|
||||
if ($result['error']) {
|
||||
$errorMsg .= $result['error'];
|
||||
} elseif ($result['http_code'] == 404) {
|
||||
$errorMsg .= "HTTP 404 - Webhook URL not found. Make sure the n8n workflow is active and the webhook is in 'Production' mode (not 'Test' mode).";
|
||||
} elseif ($result['http_code'] == 0) {
|
||||
$errorMsg .= "Could not connect to webhook URL. Check if the URL is correct and accessible.";
|
||||
} else {
|
||||
$errorMsg .= "HTTP {$result['http_code']}";
|
||||
}
|
||||
|
||||
jsonResponse([
|
||||
'success' => false,
|
||||
'error' => 'Webhook test failed: ' . ($result['error'] ?: "HTTP {$result['http_code']}"),
|
||||
'http_code' => $result['http_code']
|
||||
'error' => $errorMsg,
|
||||
'http_code' => $result['http_code'],
|
||||
'url_tested' => $webhookUrl
|
||||
], 400);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user