arazzo: 1.0.1 info: title: Highlight Frontend Error Capture summary: Open a browser session and push a payload of frontend errors so Highlight groups them against the replay. description: >- Frontend (browser) errors reach Highlight through the session ingestion GraphQL endpoint as the errors array on a pushPayload mutation; Highlight then groups them into error groups and links each to the session replay. This workflow captures that path: it runs initializeSession to open a session and branches on whether a secure id came back, and on success runs pushPayload with the collected frontend errors attached to that session. The pushPayload mutation requires the secure id minted by initializeSession, so the steps are genuinely chained. Every step spells out its GraphQL request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: sessionIngestionApi url: ../openapi/highlight-session-ingestion-api-openapi.yml type: openapi workflows: - workflowId: frontend-error-capture summary: Open a session and push frontend errors to Highlight for grouping. description: >- Runs initializeSession to obtain a session_secure_id, branches on whether the session opened, and on success runs pushPayload with the frontend errors array so Highlight aggregates them into error groups against the replay. inputs: type: object required: - organizationVerboseId - errors properties: organizationVerboseId: type: string description: The Highlight project verbose id that owns the session. clientVersion: type: string description: The highlight.run client SDK version. default: "9.0.0" firstloadVersion: type: string description: The firstload script version. default: "9.0.0" environment: type: string description: The deployment environment the errors were captured in. default: production clientId: type: string description: A stable client identifier for the browser. default: "" errors: type: array description: The array of frontend ErrorObjectInput records to report. items: type: object messages: type: string description: Serialized console/network messages accompanying the errors. default: "[]" events: type: object description: The rrweb events object for the payload (may be empty). default: {} steps: - stepId: initializeSession description: >- Run the initializeSession GraphQL mutation to open a session, then branch on whether a secure id was returned. operationId: executePublicGraphMutation requestBody: contentType: application/json payload: operationName: initializeSession query: >- mutation initializeSession($organization_verbose_id: String!, $enable_strict_privacy: Boolean!, $client_version: String!, $firstload_version: String!, $client_config: String!, $environment: String!, $client_id: String!) { initializeSession(organization_verbose_id: $organization_verbose_id, enable_strict_privacy: $enable_strict_privacy, client_version: $client_version, firstload_version: $firstload_version, client_config: $client_config, environment: $environment, client_id: $client_id) { secure_id project_id } } variables: organization_verbose_id: $inputs.organizationVerboseId enable_strict_privacy: false client_version: $inputs.clientVersion firstload_version: $inputs.firstloadVersion client_config: "{}" environment: $inputs.environment client_id: $inputs.clientId successCriteria: - condition: $statusCode == 200 outputs: sessionSecureId: $response.body#/data/initializeSession/secure_id onSuccess: - name: sessionOpened type: goto stepId: pushErrors criteria: - context: $response.body condition: $.data.initializeSession.secure_id != null type: jsonpath - stepId: pushErrors description: >- Run the pushPayload GraphQL mutation with the frontend errors array attached to the session so Highlight aggregates them into error groups. operationId: executePublicGraphMutation requestBody: contentType: application/json payload: operationName: pushPayload query: >- mutation pushPayload($session_secure_id: String!, $events: ReplayEventsInput!, $messages: String!, $errors: [ErrorObjectInput]!, $payload_id: ID) { pushPayload(session_secure_id: $session_secure_id, events: $events, messages: $messages, errors: $errors, payload_id: $payload_id) } variables: session_secure_id: $steps.initializeSession.outputs.sessionSecureId events: $inputs.events messages: $inputs.messages errors: $inputs.errors payload_id: 1 successCriteria: - condition: $statusCode == 200 outputs: payloadResult: $response.body#/data/pushPayload outputs: sessionSecureId: $steps.initializeSession.outputs.sessionSecureId payloadResult: $steps.pushErrors.outputs.payloadResult