Troubleshooting Bad Request and Internal Server error
When a server responds with a Bad Request (400) or Internal Server Error (500), It typically indicates issues with how the request is being made or processed. The reasons for these errors can vary, but the most common causes are
Incorrectly formatted POST data
- Malformed or Improperly encoded URL
- Unexpected User-Agent settings
Below are steps to help diagnose and resolve these issues.
Incorrectly formatted POST data
If the server returns a 400 Bad Request, it typically means the request contains malformed or invalid data. To resolve this issue, follow these steps:
- Ensure that the data being sent with the request matches the expected format. This is particularly important for POST requests.
- Ensure the Content-Type header value (If configured) matches with the Payload Type configured for the POST requests.
- Cross-check the request data format by reviewing the API documentation or the endpoint specification. You can test the request using tools like cURL, wGet & Postman to verify the format.
Improperly formatted URLs can also cause issues when monitoring endpoints.
- URL Encoding: URLs should be entered without prior encoding. The system will automatically encode the URL when making the request. If you have added an already encoded URL for monitoring, then there will be double encoding while making the request causing an error.
Unexpected User-Agent settings
Certain servers are configured to reject requests that appear to come from non-browser clients. This may cause a 400 or 500 error. If you suspect this is the issue, try modifying the User Agent header of your request.
- You can find your current User Agent value of your browser by visiting here.
- Enter the User Agent into the "User-Agent" field in HTTP URL add monitor page > HTTP configuration section.
- Save the configuration, and Try adding the monitor.
Internal Server Errors
An Internal Server Error (500) indicates that something went wrong on the server while processing the request.
It could be due to - Server misconfiguration
- Unhandled server-side exception
- Code errors in web applications
- Resource overload (e.g., database or server failure), etc.
Here's how to troubleshoot:
- Review the server logs for any exceptions or errors occurring while handling the request. This will help pinpoint what went wrong during processing.
- If you have access to server logs, look for stack traces or error messages that can provide insight into the problem. It may be an issue with how the server is handling the request or a server-side bug.
Still facing issues?
If the problem persists, contact our support team along with the following details: - A screenshot of the "Add Monitor" page.
- The URL debug tool response for the URL monitor.
- Reproduce the issue and share the latest Support Information File (SIF) from Applications Manager, with the "Print all logs" option enabled. To do this, go to Settings > Logging, and choose "Print all logs".
New to ADSelfService Plus?