Repository navigation
Error Codes
This document provides a comprehensive reference for error codes across FlashForge API interfaces.
The HTTP REST API (port 8898) uses a standard JSON response envelope for all endpoints.
Success:
{
"code": 0,
"message": "Success"
}Error:
{
"code": <non-zero>,
"message": "Error description"
}The HTTP status is always 200, also when the request fails. Read the code field in the JSON body. An unknown path is the only exception: it returns HTTP status 404.
| Code | Message | Endpoint | Cause |
|---|---|---|---|
| 0 | Success |
All | The request worked. |
| -2 | Lan mode error |
All except /notifyWanBind
|
LAN-only mode is off. Only some firmware sends this code. See Authentication. |
| -1 | Parameters is error |
All that take credentials, except /checkCode and /uploadGcode
|
A credential field is missing, or the body is not valid JSON. |
| -1 | Parameters is different |
/checkCode |
A credential field is missing. |
| 1 | SN is different |
All that take credentials | The serial number is wrong. |
| 1 | Access code is different |
All that take credentials | The check code is wrong. |
| 2 | Printer is busy |
/uploadGcode |
The printer is busy. The printer checks this before the credentials. |
| 2 | Printer is Busy. |
/printGcode |
The printer is not idle. |
| 3 | File does not exist. |
/printGcode |
The file is not on the printer. |
| -1 | Parameter is error. |
/printGcode |
fileName or levelingBeforePrint is missing. |
| -1 | File size is 0 |
/uploadGcode |
The fileSize header is 0. |
| -1 | Content-type is error |
/uploadGcode |
The request is not multipart/form-data. |
| -1 | Send file error |
/uploadGcode |
The printer could not save the file. |
| -1 | thumbnail error |
/getThum |
No job is active, or the job has no thumbnail. |
/control always returns 0 Success after the credential check passes. The printer does not report if the command did something. See HTTP REST API.
- Check
code === 0for success. Do not parse the message string. - The same code can have different messages. Use the endpoint and the message together to find the cause.
- The messages contain spelling and case differences (for example
Printer is busyandPrinter is Busy.). Do not compare them as exact strings.
Cause: LAN-only mode is off on the printer.
Resolution: Turn on LAN-only mode on the printer. On some firmware you must also restart the printer. See Authentication.
Causes:
- The serial number is wrong (
SN is different). - The check code is wrong (
Access code is different). - The user made a new check code on the printer.
Resolution: Read the serial number and the check code again on the printer screen.
Cause: A print or another task is active.
Resolution: Poll /detail until status is ready. Then send the request again.
Cause: /printGcode names a file that is not on the printer.
Resolution: Use /gcodeList to get the file names.
These errors appear in /detail responses or in blocking dialogs when you use the Material Station (Intelligent Filament System).
| Code | Description | Trigger |
|---|---|---|
| E0100 | Channel 1 feeding timeout | Load failure (Slot 1) |
| E0101 | Channel 2 feeding timeout | Load failure (Slot 2) |
| E0102 | Channel 3 feeding timeout | Load failure (Slot 3) |
| E0103 | Channel 4 feeding timeout | Load failure (Slot 4) |
| Code | Description | Trigger |
|---|---|---|
| E0104 | Channel 1 retracting timeout | Unload failure (Slot 1) |
| E0105 | Channel 2 retracting timeout | Unload failure (Slot 2) |
| E0106 | Channel 3 retracting timeout | Unload failure (Slot 3) |
| E0107 | Channel 4 retracting timeout | Unload failure (Slot 4) |
| Code | Description | Trigger |
|---|---|---|
| E0108 | Feed failure to extruder | Filament sensor timeout during feed |
| E0109 | Odometer stall | Filament tangle or jam (stall count > 200) |
| E0114 | IFS homing error | Selector mechanism failure |
Legacy TCP commands (port 8899) return plain text error messages.
The messages below are for the Adventurer 5M series and the AD5X. The Creator 5 has no TCP service.
| Error Message | Description |
|---|---|
CMD M601 Received. + Control failed.
|
Another client has the control session. |
Resolution: Wait for the other session to time out, or send M602 from that client.
| Error Message | Description |
|---|---|
File Is Not Aviable |
M29: the received data does not match the size in M28. The printer spells the message this way. |
Resolution: Make sure that the file size matches the M28 value. Then send the file again.
The printer does not reject an unknown command. It replies CMD Mxxx Received. and ok, and it does nothing. A reply of ok does not prove that the printer supports the command. See TCP Protocol for the supported commands.
Note: The Adventurer 3 and Adventurer 4 can use other messages. These printers are not covered here.
The /detail endpoint may include error information in the response:
{
"detail": {
"errorCode": "E0100",
"status": "error"
}
}- Check
statusfield for value "error" - Inspect
errorCodefield for specific error code - Cross-reference with error tables above
| Code | Strategy |
|---|---|
| -2 | Ask the user to turn on LAN-only mode. Do not retry until the mode changes |
| -1 | Fix the request. Do not retry the same request |
| 1 | Ask the user for the correct serial number or check code. Do not retry |
| 2 | Poll /detail until status is ready, then retry |
| 3 | Get the file names with /gcodeList
|
| Error | Strategy |
|---|---|
Control failed. |
Wait 30 seconds and retry connection |
File Is Not Aviable |
Verify file integrity, retransmit |
| Strategy | Implementation |
|---|---|
| Poll status | Check matlStationInfo.stateAction during operations |
| Retry with backoff | Implement exponential backoff for transient errors |
| User notification | Display actionable error messages to users |
| Recovery commands | Use ms_cmd with action 2 (cancel) to stop a failed operation |
- Always check response
codefield, not just HTTP status - Retry with exponential backoff only for code 2 (busy)
- Log error codes for debugging and support
- Display user-friendly messages based on error context
For long-running operations:
- Use appropriate timeouts (30-60 seconds for most operations)
- Implement progress polling for file uploads
- Reconnect and retry requests when the network disconnects.
For AD5X material station operations:
- Check
matlStationInfo.stateActionbefore starting operations - Monitor state during multi-step operations
- Implement error recovery workflows
- Clear errors using
errorCodeCtrl_cmdif available