ArcFlow
Company
Managed Services
Markets
  • News
  • LOG IN
  • GET STARTED

OZ brings Visual Intelligence to physical venues, a managed edge layer that lets real-world environments see, understand, and act in real time.

Talk to us

ArcFlow

  • World Models
  • Sensors

Managed Services

  • OZ VI Venue 1
  • Case Studies

Markets

  • Sports
  • Broadcasting
  • Robotics

Company

  • About
  • Technology
  • Careers
  • Contact

Ready to see it live?

Talk to the OZ team about deploying at your venues, from a single pilot match to a full regional rollout.

Schedule a deployment review

© 2026 OZ. All rights reserved.

LinkedIn
ArcFlow Docs
Get Started
  • Get Started
  • Quickstart
  • Installation
  • Project Setup
  • Platforms
  • Bindings
  • Licensing
  • Pricing
Capabilities
  • Vector Search
  • Graph Algorithms
  • Sync
  • MCP Server (AI Agents)
  • Live Queries
  • Programs
  • Temporal
  • Spatial
  • Trusted RAG
  • Behavior Graph
  • Agent-Native
  • Event Sourcing
  • GPU Acceleration
  • Intent Relay
Concepts
  • World Model
  • Graph Model
  • Query Language (GQL)
  • Graph Patterns
  • SQL vs GQL
  • Parameters
  • Query Results
  • Persistence & WAL
  • Error Handling
  • Observations & Evidence
  • Confidence & Provenance
  • Proof Artifacts & Gates
  • Skills
GQL / WorldCypher
  • Overview
  • MATCH
  • WHERE
  • RETURN
  • OPTIONAL MATCH
  • CREATE
  • SET
  • MERGE
  • DELETE
  • REMOVE
  • WITH
  • UNION
  • UNWIND
  • CASE
  • Spatial Queries
  • Temporal Queries
  • Algorithms Reference
  • Triggers
Schema
  • Overview
  • Indexes
  • Constraints
  • Data Types
Functions
  • Built-in Functions
  • Aggregations
  • Procedures
  • Shortest Path
  • EXPLAIN
  • PROFILE
Skills
  • Overview
  • CREATE SKILL
  • PROCESS NODE
  • REPROCESS EDGES
Operations
  • CLI
  • REPL Commands
  • Snapshot & Restore
  • Server Modes & PG Wire
  • Persistence
  • Import & Export
  • Docker
  • Architecture
  • Cloud Architecture
  • Sync Protocol (Deep Dive)
Guides
  • Agent Integration
  • World Model
  • Graph Model Fundamentals
  • Trusted RAG
  • Using Skills
  • Behavior Graphs
  • Swarm & Multi-Agent
  • Migration Guide
  • Filesystem Workspace
  • From SQL to GQL
  • ArcFlow for Coding Agents
  • Data Quality & Pipeline Integrity
  • Code Intelligence
Tutorials
  • Knowledge Graph
  • Entity Linking
  • Vector Search
  • Graph Algorithms
Recipes
  • CRUD
  • Multi-MATCH
  • MERGE (Upsert)
  • Full-Text Search
  • Temporal Queries
  • Batch Projection
  • GraphRAG
Use Cases
  • Agent Tooling
  • Knowledge Management
  • RAG Pipeline
  • Fraud Detection
  • Sports Analytics
  • Grounded Neural Objects
  • Behavior Graphs
  • Autonomous Systems
  • Digital Twins
  • Robotics & Perception
Reference
  • TypeScript API
  • GQL Conformance
  • Compatibility Matrix
  • Glossary
  • Data Types
  • Operators
  • Error Codes
  • Known Issues

Error Handling

The SDK provides structured errors with codes, categories, and recovery hints.

ArcflowError#

All errors from the engine are wrapped in ArcflowError:

import { ArcflowError } from 'arcflow'
 
try {
  db.query("INVALID QUERY")
} catch (err) {
  if (err instanceof ArcflowError) {
    console.log(err.code)        // "EXPECTED_KEYWORD"
    console.log(err.category)    // "parse"
    console.log(err.message)     // "Expected MATCH, CREATE, MERGE, ..."
    console.log(err.suggestion)  // "Expected MATCH or CREATE" (when available)
  }
}

Error categories#

CategoryWhenExample Codes
parseQuery syntax is invalidEXPECTED_KEYWORD, UNEXPECTED_TOKEN, INVALID_SYNTAX
validationQuery is syntactically valid but semantically wrongUNKNOWN_FUNCTION, TYPE_MISMATCH, UNKNOWN_PROCEDURE
executionRuntime error during query executionUNKNOWN, general execution failures
integrationInfrastructure or lifecycle errorLOCK_POISONED, WAL_ERROR, DB_CLOSED

Error code reference#

CodeCategoryMeaningFix
EXPECTED_KEYWORDparseQuery syntax wrongCheck MATCH/CREATE/MERGE syntax
UNEXPECTED_TOKENparseUnexpected token in queryRun CALL db.help()
UNKNOWN_FUNCTIONvalidationFunction doesn't existRun CALL db.help()
UNKNOWN_PROCEDUREvalidationProcedure doesn't existRun CALL db.procedures()
WORKFLOW_NOT_FOUNDvalidationWorkflow name doesn't existRun CALL arcflow.workflow.list
STEP_NOT_FOUNDvalidationStep name not in workflowCheck step name spelling
EXECUTION_CONTEXT_MISMATCHintegrationContext guard failedCALL db.setExecutionContext(...) first
UNKNOWN_EXECUTION_CONTEXTvalidationInvalid context stringUse local_cpu, local_gpu, or distributed
TEMPORAL_WAL_NOT_WIREDintegrationAS OF seq used without WAL contextOpen the store with WAL enabled (open() or openInMemory() with sync options)
LOCK_POISONEDintegrationInternal mutex poisonedRestart the process
WAL_ERRORintegrationWrite-ahead log I/O errorCheck disk space and file permissions
DB_CLOSEDintegrationCalled after db.close()Don't use db after closing

Common errors and fixes#

Parse errors#

// Wrong:
db.query("FIND (n:Person)")  // EXPECTED_KEYWORD — "FIND" is not a keyword
 
// Right:
db.query("MATCH (n:Person) RETURN n")

Missing RETURN clause#

// Wrong:
db.query("MATCH (n:Person)")  // Needs a RETURN
 
// Right:
db.query("MATCH (n:Person) RETURN n.name")

Using closed database#

db.close()
db.query("RETURN 1")  // ArcflowError: code=DB_CLOSED, category=integration

Programmatic error handling#

try {
  db.query(userProvidedQuery)
} catch (err) {
  if (err instanceof ArcflowError) {
    switch (err.category) {
      case 'parse':
        return { error: 'Invalid query syntax', detail: err.message }
      case 'validation':
        return { error: 'Query validation failed', detail: err.message }
      case 'execution':
        return { error: 'Query execution failed', detail: err.message }
      case 'integration':
        return { error: 'Database error', detail: err.message }
    }
  }
  throw err  // Re-throw unexpected errors
}

Health check#

Use isHealthy() to check if the database is operational:

if (!db.isHealthy()) {
  // Reinitialize or alert
}

See Also#

  • Error Codes — complete typed error model and recovery hints
  • ArcFlow for Coding Agents — how agents pattern-match on error codes
  • Parameters — $param placeholders prevent injection errors
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousPersistence & WALNext →Observations & Evidence