Documentation Index
Fetch the complete documentation index at: https://mintlify.com/BhaveshBytess/PREDICTIVE-MAINTENANCE/llms.txt
Use this file to discover all available pages before exploring further.
Error Response Format
All API errors follow the FastAPI standard error format:HTTP Status Codes
The API uses standard HTTP status codes to indicate success or failure:Success Codes
| Code | Description |
|---|---|
200 OK | Request successful, data returned |
Client Error Codes
| Code | Description | Common Causes |
|---|---|---|
422 Unprocessable Entity | Validation error | Missing required fields, invalid data types, out-of-range values |
Server Error Codes
| Code | Description | Common Causes |
|---|---|---|
503 Service Unavailable | Database or service unavailable | InfluxDB connection failed, deployment environment limitations |
Common Error Scenarios
Validation Errors (422)
Occur when the request payload doesn’t match the expected schema.The
loc field shows the exact path to the invalid field: ["body", "signals", "voltage_v"] means the error is in request.body.signals.voltage_v.Database Unavailable (503)
Occurs when InfluxDB is not available or cannot be reached.- Use
/system/*endpoints for demo features that don’t require database persistence - Check
/healthendpoint to verify database connectivity status - Ensure
INFLUX_TOKENandINFLUX_URLenvironment variables are configured
InfluxDB Not Available in Deployment
- Use alternative endpoints under
/system/*that use in-memory storage - Deploy to an environment that supports InfluxDB connectivity
- Check the deployment logs for import errors
Error Handling Best Practices
Check Response Status
Always check the HTTP status code before processing the response:Handle Validation Errors
Parse validation errors to provide user-friendly feedback:Implement Retry Logic
For 503 errors, implement exponential backoff:Debugging Tips
- Check the
/healthendpoint to verify API and database status - Use the interactive docs at
/docsto test requests and see expected schemas - Validate your payload against the schema before sending requests
- Check CORS settings if requests fail from the browser
- Review the
locfield in validation errors to identify the exact problem field