Error Reference
Errors arrive as compile.error or auth.error JSON messages. The code field identifies the specific problem. The message field is a human-readable description intended for display.
Auth errors
Section titled “Auth errors”These arrive as auth.error messages. The connection is closed immediately after.
MISSING_KEY
Section titled “MISSING_KEY”The first message did not include an api_key field, or the first message was not compile.start.
Recovery: Ensure the very first message on a new connection is compile.start with a non-empty api_key.
INVALID_KEY
Section titled “INVALID_KEY”The key does not exist in the system.
Recovery: Verify the key value. Create a new key in the dashboard if needed.
KEY_EXPIRED
Section titled “KEY_EXPIRED”The key has passed its configured expiry date.
Recovery: Create a new key. Expired keys cannot be reactivated.
KEY_REVOKED
Section titled “KEY_REVOKED”The key was manually revoked.
Recovery: Create a new key. Revoked keys cannot be reactivated.
Compile errors
Section titled “Compile errors”These arrive as compile.error messages. The connection remains open after a compile error — you can start another job on the same connection.
INVALID_REQUEST
Section titled “INVALID_REQUEST”The compile.start message was missing required fields (typically entry).
Recovery: Include a non-empty entry field identifying the entry point file within the tarball.
A tarball upload is already in progress on this connection. The server does not accept a second compile.start while the first upload has not yet completed.
Recovery: Wait for the current job to finish (receive compile.done or compile.error) before starting a new one on the same connection. Alternatively, open a new connection.
UPLOAD_TIMEOUT
Section titled “UPLOAD_TIMEOUT”No compile.upload.done was received within 120 seconds of the first binary frame.
Recovery: Check your upload code for buffering issues. Send compile.upload.done promptly after the last binary frame. For large tarballs, ensure your network connection is not throttled.
UPLOAD_FAILED
Section titled “UPLOAD_FAILED”An internal error occurred while collecting the upload.
Recovery: Retry the request. If the error persists, contact [email protected].
S3_ERROR
Section titled “S3_ERROR”The compiled binary or the source tarball could not be stored due to an object storage error.
Recovery: Retry after a short delay. This is typically transient. If it persists, check the Pure status page or contact support.
QUEUE_ERROR
Section titled “QUEUE_ERROR”The compile job could not be enqueued for processing.
Recovery: Retry after a short delay. This is typically transient.
JOB_FAILED
Section titled “JOB_FAILED”The compile worker ran the job but it exited with a non-zero status. This usually means:
- The TypeScript code has type errors.
- The entry point uses unsupported features. See Language → Not supported.
- A required npm package is missing or incompatible.
- The job exceeded the 20-minute wall-clock timeout.
- The job exceeded the 2 GiB memory limit.
Recovery: Examine the compile.log messages that arrived before this error — they contain the compiler’s error output. Fix the underlying issue and resubmit.
PRESIGN_ERROR
Section titled “PRESIGN_ERROR”The server could not generate a presigned download URL after successful compilation.
Recovery: The binary was compiled successfully and is in storage. Retry the download URL generation by re-subscribing to the job via jobs.subscribe. If the error persists, contact support — the binary will not be automatically deleted.
NOT_FOUND
Section titled “NOT_FOUND”A jobs.subscribe request referenced a job ID that does not exist or belongs to a different organization.
Recovery: Verify the job_id value. Job IDs are returned in compile.queued messages.
Checking error codes programmatically
Section titled “Checking error codes programmatically”ws.on('message', (data) => { const msg = JSON.parse(data.toString()); if (msg.type === 'compile.error') { switch (msg.code) { case 'JOB_FAILED': // check compile.log messages for details break; case 'UPLOAD_TIMEOUT': // retry with a faster upload break; case 'S3_ERROR': case 'QUEUE_ERROR': // transient — retry after delay break; default: // unexpected error } }});