import{ulid as d}from"ulid";import{getAttributesStringValue as t,toAttribute as e}from"../otlp.js";const l=r=>{const a=`err_${d()}`;return[e("cloudevents.event_data.error.object","error"),e("cloudevents.event_data.error.id",a),e("cloudevents.event_data.error.uri",`urn:error:ulid:${a}`),e("cloudevents.event_data.error.handler",t(r.get("redocly.event_data.handler"))),e("cloudevents.event_data.error.type",t(r.get("redocly.event_data.type"))),e("cloudevents.event_data.error.message",t(r.get("redocly.event_data.message"))),e("cloudevents.event_data.error.stack",t(r.get("redocly.event_data.stack"))),e("cloudevents.event_data.page.object","page"),e("cloudevents.event_data.page.id",t(r.get("redocly.page.uri"))),e("cloudevents.event_data.page.uri",t(r.get("redocly.page.uri"))),e("cloudevents.event_data.page.initial_referrer",t(r.get("redocly.page.initial_referrer")))]},v=r=>[e("cloudevents.event_data.error.message",t(r.get("redocly.event_data.message"))),e("cloudevents.event_data.error.url",t(r.get("redocly.event_data.url")))];export{v as handleClientErrorEvent,l as handleErrorEvent};
