Skip to content

Commit b5ecef0

Browse files
authored
Merge pull request #3630 from OpenNeuroOrg/fix/datacite-sentry-log
update sentry to only log if dataset has datacite
2 parents 77cf22f + 3ccb98e commit b5ecef0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/openneuro-server/src/datalad/contributors.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ export const contributors = async (
6767
}
6868

6969
// --- Dataset type but no contributors ---
70-
if (resourceType === "Dataset") {
70+
// Only log if a Datacite file actually exists
71+
if (
72+
dataciteData?.data?.attributes &&
73+
resourceType === "Dataset" &&
74+
!attributes?.contributors?.length
75+
) {
7176
Sentry.captureMessage(
7277
`Datacite file for ${datasetId}:${revisionShort} is Dataset type but provided no contributors.`,
7378
)

0 commit comments

Comments
 (0)