appleScriptError carried the raw NSDictionary from NSAppleScript's error out-param, which isn't Sendable and got flagged once the type crossed an async boundary. Extract just the two fields actually used (errorNumber, errorMessage) into plain Int/String instead.