API Error References
This document outlines common errors you may encounter when interacting with the API, along with troubleshooting guidance.
HTTP Status Codes
400 Bad Request
Description: The server cannot process the request due to client-side errors.
Missing Parameters
start
or end
parameters not provided in /path
, /debug_path
, or /comp_path
endpoints.
Ensure both start
and end
are included in the query string.
GET /path?start=5&end=6
Invalid Parameter Format
Non-integer values (e.g., strings) passed for start
, end
, or numeric parameters.
Use valid 32-bit integers for numeric parameters.
GET /path?start=5&end=6
(valid) vs. GET /path?start=nodeA&end=nodeB
(invalid)
Same Start/End Node
start
and end
parameters have identical values.
Ensure start
and end
refer to distinct nodes.
GET /path?start=5&end=5
(invalid)
Invalid Response Format
Unsupported format
value (e.g., txt
).
Use json
(default) or xml
.
GET /path?start=5&end=6&format=xml
404 Not Found
Description: The requested resource does not exist.
Node Not Found
start
or end
node ID does not exist in the dataset.
Verify node IDs against the dataset.
If nodes are 1-1000: GET /path?start=1&end=1500
(invalid)
Node Out of Range
Node ID exceeds the valid range (e.g., dataset has nodes 1-1000, but ID=1500).
Use node IDs within the dataset’s range.
GET /path?start=1&end=1000
(valid)
405 Method Not Allowed
Description: An unsupported HTTP method was used.
Invalid HTTP Method
Using POST
instead of GET
for endpoints.
Use GET
for all API requests.
GET /path?start=5&end=6
(valid) vs. POST /path
(invalid)
500 Internal Server Error
Description: An unexpected server-side error occurred.
Server Configuration
Missing dataset files, corrupted data, or runtime exceptions.
Check server logs for details. Restart the service or contact the administrator.
N/A
Troubleshooting Tips
Check Parameters: Ensure
start
andend
are valid integers and within the dataset’s node range.Validate HTTP Method: Use
GET
for all endpoints.Review Response Format: Add
&format=xml
to the URL if you prefer XML; otherwise, JSON is returned by default.CORS Issues: Include the
Access-Control-Allow-Origin: *
header in client-side requests.Logs: Enable
display_error_responses
on the server to see detailed error descriptions.
Last updated