Login Register
When Something Goes Wrong: How GameCatalyst Self-Heals

Fetching Correct Usage from WhatIs

Estimated reading: 0 minutes 9 views

When Vex uses a command incorrectly, GameCatalyst automatically fetches the correct usage from WhatIs and appends it to the error response. This self-healing mechanism eliminates trial-and-error loops and enables Vex to correct mistakes on the next attempt without user intervention.

How it works:

The automatic recovery process happens in milliseconds:

  1. Command fails with validation error — Vex calls a command with missing or incorrect parameters
  2. GameCatalyst identifies the command name — Extracts the command name from the failed call
  3. GameCatalyst queries WhatIs for command documentation — Sends HTTP request to WhatIs Discovery endpoint (http://127.0.0.1:5001/api/command/{command_name})
  4. WhatIs returns: parameters, types, descriptions, examples — Full command documentation in JSON format
  5. GameCatalyst formats this as recovery guidance — Converts JSON to human-readable text optimized for AI consumption
  6. Guidance is appended to the error response — Error message + recovery guidance sent to Vex
  7. Vex reads the guidance and corrects the call — Next attempt succeeds

Example recovery:

Vex calls: component.set target="Player" property="mass" value=2

Error: “Missing required parameter ‘component'”

Auto-appended guidance:

“component.set requires: target (string), component (string), property (string), value (any). Example: component.set target=’Player’ component=’Rigidbody’ property=’mass’ value=2”

Vex’s corrected call: component.set target="Player" component="Rigidbody" property="mass" value=2

Success. No user intervention required.

Benefits:

  • Vex self-corrects without user intervention — You don’t need to explain what went wrong or how to fix it
  • Reduces trial-and-error loops — Vex gets it right on the second attempt instead of the fifth
  • Provides consistent, accurate guidance — Documentation comes directly from WhatIs, always up-to-date
  • Works even when Vex hasn’t called what_is beforehand — Vex doesn’t need to proactively check documentation; errors trigger automatic fetching
  • Saves time — Eliminates back-and-forth debugging conversations

What you’ll notice:

When Vex makes a mistake, you’ll see two messages in quick succession:

  1. Error message with recovery guidance
  2. Success message from corrected attempt

The entire error-correction cycle takes 2-5 seconds. It feels almost instantaneous.

Offline fallback:

If the WhatIs Discovery endpoint is unavailable (server down, network issue), GameCatalyst falls back to local database rules stored in gc_settings.db. Recovery guidance still works, but it may be less detailed than the live WhatIs version.

Coverage:

Automatic recovery guidance works for all 40+ GameCatalyst commands. Every command has documentation in WhatIs, so every command can provide self-healing error responses.

Share this Doc

Fetching Correct Usage from WhatIs

Or copy link

CONTENTS
Antimanual

Ask our AI support assistant your questions about our platform, features, and services.

You are offline
Chatbot Avatar
What can I help you with?