MCPcopy Create free account
hub / github.com/buggregator/server / resolveProject

Function resolveProject

modules/sentry/handler.go:390–395  ·  view source on GitHub ↗

resolveProject maps a Sentry DSN project segment to a Buggregator project key. The Sentry JavaScript SDK rejects non-numeric DSN project ids, so a purely numeric segment is the SDK-internal project id, not a Buggregator project name — it resolves to empty so the event lands in the default project. I

(segment string)

Source from the content-addressed store, hash-verified

388// numeric segment is the SDK-internal project id, not a Buggregator project name —
389// it resolves to empty so the event lands in the default project. Issue #338.
390func resolveProject(segment string) string {
391 if isAllDigits(segment) {
392 return ""
393 }
394 return segment
395}
396
397func isAllDigits(s string) bool {
398 if s == "" {

Callers 2

HandleMethod · 0.85
TestResolveProjectFunction · 0.85

Calls 1

isAllDigitsFunction · 0.85

Tested by 1

TestResolveProjectFunction · 0.68