Error handling and regeneration
When to use this
Calls fail with type errors, missing methods, or connection errors after you changed the hosted module or Gateway configuration.
Prerequisites
Exception propagation
Exceptions thrown in the receiver runtime propagate to the caller as native errors in the calling language:
try { await service.riskyMethod(); } catch (error) { // receiver exception type mapped to caller console.error(error); }
try { service.RiskyMethod(); } catch (Exception ex) { // handle }
When to regenerate / reinstall Grafts
Refresh the Graft package when:
- Public interface changed (new methods, signature changes)
- Module version bumped on Gateway
--noVersioninghash changed and consumer sees identity mismatch- Alpha major upgrade requires Gateway + Graft refresh (see Alpha limitations)
npm update @graft/nuget-YourModule --registry=http://grft.dev/<id>__graftcode
dotnet add package graft.nuget.YourModule --source http://grft.dev/<id>__graftcode
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Method not found | Stale Graft or filtered --types | Reinstall Graft; check Vision |
| Type errors at compile time | Interface changed | Regenerate/reinstall Graft |
| Connection failed | Wrong host, GG down, firewall | Debugging runbook |
| Registration failed on GG | Same version, changed interface | Bump version or --noVersioning |
Verify recovery
- After reinstall, IDE shows updated method signatures
- Calls succeed against updated Gateway