Skip to main content

Error codes

When a request to NOPAL's API fails, the response carries an HTTP code and a JSON body with the reason. This page explains each code, with the real messages the core returns and what to do.

Shape of the response​

{ "detail": "Permiso insuficiente" }
  • detail is human-readable text. The interface shows it as is in a notice.
  • The server's messages are always in Spanish, whatever the interface language.
  • Some errors add a sibling field without changing detail:
Extra fieldWhereWhat for
error_codeWhen registering a network printerA stable code (see below) the guided wizard uses to word its message
retry_after502 responses from NOPAL IntelligenceSeconds the AI provider asks you to wait before retrying. The interface shows the countdown
  • Validation errors generated by the framework itself (missing parameters or the wrong type) answer 422 with detail as a list of objects, not as text.

HTTP codes​

CodeMeansdetail examplesWhat to do
400The request is wrong: a value is not valid"Ruta inválida" (invalid path), "Nombre de archivo inválido" (invalid file name), "IP inválida" (invalid IP), "Tipo no válido" (invalid type), "Formato no válido (xml o pdf)", "Todavía no hay un servidor de IA configurado" (no AI server configured yet)Fix the value indicated. When registering a network printer, look at the error_code
401There is no session or it is not valid"No autenticado" (not authenticated), "Sesión inválida" (invalid session), "Usuario o contraseña incorrectos" (wrong username or password)Sign in again
403There is a session, but your role is not enough"Permiso insuficiente" (insufficient permission), "Las acciones de la IA están desactivadas" (AI actions are off)Ask an administrator. See Roles by action
404What you ask for does not exist"Archivo no encontrado" (file not found), "Carpeta no encontrada" (folder not found), "El plugin no está instalado" (the plugin is not installed), "Usuario no encontrado" (user not found), "Elemento no encontrado en la cola" (item not found in the queue)Refresh the list: someone may have deleted or moved it
409Conflict with the current state of the machine or the data"No se pudo pausar / reanudar / cancelar la impresión" (could not pause / resume / cancel the print), "Ya hay un trabajo en curso en este láser" (a job is already running on this laser), "La placa no tiene una tarjeta SD lista" (the board has no SD card ready), "La carpeta ya existe" (the folder already exists), "Actualización bloqueada: hay trabajos activos…" (update blocked: there are active jobs)Wait for the job to finish or change what clashes. To update NOPAL, stop the machines first
413A file is too large"La imagen pesa más de 15 MB" (the image weighs more than 15 MB)Use a smaller file. It is the "Image to drawing" limit
422The request is correct but cannot be processed"Ese archivo no tiene ningún movimiento de corte, no hay nada que encuadrar" (that file has no cutting move, there is nothing to frame), or a list of validation errorsCheck the file or the parameters
429Too many attempts"Demasiados intentos; vuelve a intentarlo en unos minutos" (too many attempts; try again in a few minutes)It is the sign-in limit: 5 failures in 5 minutes. Wait. See Security
500Unexpected server failure"No se pudo guardar la configuración…" (could not save the configuration), "No se pudo leer el estado de git" (could not read the git state), "Este plugin no tiene un repositorio configurado" (this plugin has no repository configured)Check the logs and, if it persists, open an issue with the message
501Feature not available"Los plugins pagos todavía no están disponibles (falta el servidor de licencias)" (paid plugins are not available yet: the license server is missing)There is no fix: paid plugins cannot be installed
502NOPAL could not talk to the machine or to an external service"No se pudo enviar el comando" (could not send the command), "No se pudo mover el eje" (could not move the axis), "No se pudo iniciar el home" (could not start homing), "No se pudo contactar al láser" (could not reach the laser), "No se detectó respuesta GRBL en este puerto" (no GRBL response detected on this port), or an AI provider errorCheck that the machine is on, connected and on the same network. See Troubleshooting
503NOPAL Intelligence is not availableA clear message that the AI is offAn administrator must turn it on and configure a server
409 versus 502

A 409 indicates the order could not be applied to the current state (for example, pausing something that is not printing). NOPAL does not always tell that case apart from a communication failure with the machine. A 502 indicates that communication failed while running a command on the machine or an external service.

Printer registration codes​

When registering a network printer (Marlin over WiFi, Bambu Lab, Elegoo or FlashForge), a failure answers 400 with detail and an error_code:

error_codeWhenWhat to do
IP_INVALIDThe address is not validCheck the IP or host name
CREDENTIAL_REJECTEDThe printer rejected the credentialsCheck the access code, the check code or the printer's details
SERVICE_REFUSEDThe printer refused the connection to the serviceCheck that the printer's network service is enabled
CONNECTION_FAILEDThere was no connectionCheck that the printer is on and on the same network as NOPAL
PROTOCOL_INVALIDThe response does not have the expected formatVerify the address belongs to a printer of that brand
UNKNOWNAny other caseCheck the logs

NOPAL does not tell "port blocked" from "device off": they produce the same timeout and cannot be separated without inventing a signal.

For more detail, see Connect your first machine.

Source​

The codes and messages come from the core's exceptions (HTTPException) and from backend/errors.py. A particular route may also return codes of its own: see the core REST API.