Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫
Something went wrong. Try again.
715 B · 30 lines
TypeScript
at main
12345678910111213141516171819202122232425262728293031import slugify from 'slugify'
import {getEntries} from '#/logger/logDump'import {Sentry} from '#/logger/sentry/lib'
export function sendErrorReport({ title, description, handle,}: { title: string description: string handle: string}) { const name = slugify(title, {lower: true, strict: true}).slice(0, 32) Sentry.withScope(scope => { scope.addAttachment({ filename: name + '.json', data: JSON.stringify(getEntries()), contentType: 'application/json', // mimetype: 'application/json', // need to update Sentry }) scope.setExtras({ title, description, handle, }) scope.captureMessage(`[USER REPORT] ${handle} ${name}`, 'error') })}