Webhook Errors¶
This guide helps you diagnose and fix HTTP errors when sending alerts to Parapet Security.
Error Reference¶
400 Bad Request¶
Meaning: The request body couldn't be parsed.
Common Causes:
- Invalid JSON syntax
- Missing required fields
- Encoding issues
Solution:
-
Validate your JSON:
-
Check for common JSON errors:
- Unescaped quotes in strings
- Trailing commas
-
Missing brackets
-
Ensure Content-Type header is set:
401 Unauthorized¶
Meaning: Authentication failed.
Common Causes:
- Missing Authorization header
- Invalid token format
- Token for wrong tenant
Solution:
-
Verify Authorization header format:
-
Check for typos in the token
-
Generate a new token:
- Go to Settings → Service Tokens
- Click Generate New Token
- Update your SIEM configuration
403 Forbidden¶
Meaning: Token is valid but not authorized.
Common Causes:
- Token was revoked
- Token expired
- Tenant suspended
Solution:
-
Check token status in Settings → Service Tokens
-
If expired or revoked, generate a new token
-
If tenant suspended, contact support
404 Not Found¶
Meaning: The webhook endpoint doesn't exist.
Common Causes:
- Wrong URL path
- Typo in tenant ID
- Wrong region
Solution:
-
Verify URL format:
-
Check your webhook URL in Settings → Service Tokens
-
Ensure region matches your account (us or eu)
413 Payload Too Large¶
Meaning: Alert payload exceeds 1 MB limit.
Common Causes:
- Raw logs included in payload
- Large attachment data
- Base64 encoded binaries
Solution:
- Reduce payload size:
- Remove raw log data
- Summarize large fields
-
Reference external data instead of including it
-
If you need larger payloads, contact support for options
429 Too Many Requests¶
Meaning: Rate limit exceeded.
Common Causes:
- Too many alerts per minute
- Alert flood from SIEM
- Plan limits reached
Solution:
- Check your rate limits:
| Plan | Per Minute | Per Day |
|---|---|---|
| Starter | 50 | 1,000 |
| Professional | 200 | 5,000 |
| Team | 500 | 20,000 |
-
Implement retry with exponential backoff:
-
Filter alerts in your SIEM to reduce volume
-
Consider upgrading your plan
500 Internal Server Error¶
Meaning: Server-side error.
Common Causes:
- Temporary service issue
- Unusual payload format
- Backend processing error
Solution:
-
Retry the request after a few seconds
-
If persistent, check status.parapetsecurity.com
-
Contact support with the request details
502 Bad Gateway¶
Meaning: Load balancer couldn't reach the backend.
Common Causes:
- Service restarting
- Network issues
- High load
Solution:
-
Wait 30 seconds and retry
-
Check status page for outages
-
If persistent, contact support
503 Service Unavailable¶
Meaning: Service temporarily unavailable.
Common Causes:
- Planned maintenance
- Capacity issues
- Service restart
Solution:
-
Check status page for maintenance windows
-
Implement retry logic with backoff
-
Queue alerts locally until service recovers
Debugging Tips¶
Capture Full Request¶
See exactly what your SIEM is sending:
# Start a local listener
nc -l 8080
# Point SIEM at localhost:8080 temporarily
# See the full request
Test with cURL¶
Isolate the issue with a direct test:
curl -v -X POST https://webhook-us.parapetsecurity.com/webhook/{tenant-id} \
-H "Authorization: Bearer pst_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"source": "test", "message": "test"}'
The -v flag shows headers and connection details.
Check Response Body¶
Error responses include details:
{
"error": {
"code": "invalid_token",
"message": "The provided token is not valid",
"request_id": "abc123"
}
}
Include the request_id when contacting support.
Retry Best Practices¶
Exponential Backoff¶
Retry Conditions¶
| Status Code | Retry? | Reason |
|---|---|---|
| 429 | Yes | Wait for rate limit reset |
| 500 | Yes | Temporary server issue |
| 502 | Yes | Load balancer issue |
| 503 | Yes | Service restart |
| 400 | No | Fix the request |
| 401 | No | Fix authentication |
| 403 | No | Check token status |
| 404 | No | Fix the URL |
Queue for Later¶
If retries fail, queue alerts locally:
import json
from pathlib import Path
QUEUE_DIR = Path("/var/spool/parapet-queue")
def queue_alert(alert):
queue_file = QUEUE_DIR / f"{alert['id']}.json"
queue_file.write_text(json.dumps(alert))
def process_queue():
for queue_file in QUEUE_DIR.glob("*.json"):
alert = json.loads(queue_file.read_text())
if send_alert(alert).ok:
queue_file.unlink()
Getting Help¶
If you can't resolve the error:
- Note the error code and message
- Capture the request ID from the response
- Record the timestamp
- Contact support@parapetsecurity.com