Skip to content

Commit 9d3a9da

Browse files
authored
Merge pull request #19 from keyxmakerx/claude/coordinate-security-bestiary-mnp54
Include API errors in debug snapshot clipboard export
2 parents 6c2d5ff + c3f91cf commit 9d3a9da

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

scripts/sync-dashboard.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,11 @@ export class SyncDashboard extends HandlebarsApplicationMixin(ApplicationV2) {
18721872
m => m.constructor?.name === 'ActorSync' || m._adapter
18731873
);
18741874

1875+
// Include API errors so they appear in the debug copy/paste.
1876+
const errorLog = this.api?.getErrorLog() ?? [];
1877+
const connectionState = this.api?.connected
1878+
? 'connected' : (this.api ? 'disconnected' : 'no-client');
1879+
18751880
return {
18761881
_description: 'Chronicle Sync — Foundry System Debug Snapshot. '
18771882
+ 'Use this to build a Chronicle system adapter or character-fields manifest. '
@@ -1896,7 +1901,9 @@ export class SyncDashboard extends HandlebarsApplicationMixin(ApplicationV2) {
18961901
matchedSystem,
18971902
hasAdapter: !!actorSync?._adapter,
18981903
adapterType: actorSync?._adapter?._fieldDefs ? 'generic' : (actorSync?._adapter ? 'built-in' : 'none'),
1904+
connection: connectionState,
18991905
},
1906+
errors: errorLog.length ? errorLog : null,
19001907
hooks: {
19011908
_note: 'These are the Foundry hooks the Chronicle sync module listens to. '
19021909
+ 'The adapter maps fields between these hook payloads and Chronicle entity fields_data.',

0 commit comments

Comments
 (0)