Troubleshooting Guide
Introduction
This troubleshooting guide provides solutions to common issues you may encounter when using the File Upload and Management API. Follow the steps below to diagnose and resolve problems related to authentication, file uploads, file downloads, and file listing.
Common Issues
1. Authentication Failures
Error Message
{
"statusCode": 400,
"error": "Bad Request",
"message": "No auth headers"
}
Possible Causes
- Missing authentication headers (
x-auth-nameandx-auth-password). - Incorrect customer name or password.
Solutions
- Ensure both
x-auth-nameandx-auth-passwordheaders are included in your request. - Double-check your customer name and password for typos.
- Contact the API administrator to verify your credentials.
2. Missing or Incorrect File Parameter
Error Message
{
"statusCode": 400,
"error": "Bad Request",
"message": "No file"
}
Possible Causes
- The file parameter is not included in the request body.
- The file path is incorrect.
Solutions
- Ensure your request includes the file parameter.
- Verify the file path is correct and the file exists.
Example Request
curl -X POST http://yourserver.com/upload \
-H "x-auth-name: yourname" \
-H "x-auth-password: yourpassword" \
-F "file=@/path/to/yourfile.txt"
3. File Not Found
Error Message
{
"statusCode": 400,
"error": "Bad Request",
"message": "File not found"
}
Possible Causes
- The specified file does not exist in the directory.
- Incorrect filename or file path.
Solutions
- Ensure the filename is correct and includes the correct extension.
- Verify the file exists in your directory.
Example Request
curl -X GET http://yourserver.com/serve/yourfile.txt \
-H "x-auth-name: yourname" \
-H "x-auth-password: yourpassword" \
-O
4. No Files Uploaded Yet
Error Message
{
"statusCode": 400,
"error": "Bad Request",
"message": "No files uploaded yet"
}
Possible Causes
- No files have been uploaded by the authenticated user.
Solutions
- Upload files using the
POST /uploadendpoint. - Verify your authentication headers are correct.
Example Request
curl -X POST http://yourserver.com/upload \
-H "x-auth-name: yourname" \
-H "x-auth-password: yourpassword" \
-F "file=@/path/to/yourfile.txt"
5. Server Errors
Error Message
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}
Possible Causes
- Server-side issues or misconfigurations.
Solutions
- Retry the request after some time.
- Contact the API support team with details of the request and error message.
Tips for Successful Requests
- Always use HTTPS: Ensure your requests are made over HTTPS to secure your credentials.
- Check Headers and Parameters: Double-check that all required headers and parameters are included and correct.
- File Paths: Ensure file paths are correct and the files exist on your local machine when uploading.