Skip to content

Commit 9e098a8

Browse files
committed
chore(server): Add Sentry and logging to createDataset failure
1 parent 0ecf2dc commit 9e098a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*
44
* See resolvers for interaction with other data sources.
55
*/
6+
import * as Sentry from "@sentry/node"
67
import request from "superagent"
78
import requestNode from "request"
89
import objectHash from "object-hash"
@@ -72,8 +73,9 @@ export const createDataset = async (
7273
await notifications.snapshotReminder(datasetId)
7374
return ds
7475
} catch (e) {
76+
Sentry.captureException(e)
7577
// eslint-disable-next-line
76-
console.error(`Failed to create ${datasetId}`)
78+
console.error(`Failed to create ${datasetId}: ${e}`)
7779
throw e
7880
}
7981
}

0 commit comments

Comments
 (0)