Skip to content

Commit

Permalink
Better edit track error logging (#10431)
Browse files Browse the repository at this point in the history
  • Loading branch information
schottra authored Nov 13, 2024
1 parent 4940f60 commit bac5d9d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/web/src/common/store/cache/tracks/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,14 @@ function* confirmEditTrack(
)
yield* call(recordEditTrackAnalytics, currentTrack, confirmedTrack)
},
function* () {
function* ({ error, message, timeout }) {
const reportToSentry = yield* getContext('reportToSentry')
reportToSentry({
error,
additionalInfo: { message, timeout, trackId, formFields },
name: 'Edit Track'
})
yield* put(trackActions.editTrackFailed())
// Throw so the user can't capture a bad upload state (especially for downloads).
// TODO: Consider better update revesion logic here coupled with a toast or similar.
throw new Error('Edit track failed')
}
)
)
Expand Down

0 comments on commit bac5d9d

Please sign in to comment.