Skip to content

Commit 983306c

Browse files
authored
fix(app): surface run record creation errors to users on upload page (#9597)
1 parent 7cf3233 commit 983306c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/organisms/ProtocolUpload/hooks/useCreateRun.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ export function useCreateRun(): UseCreateRun {
3030
console.error(`error invalidating runs query: ${e.message}`)
3131
)
3232
},
33+
onError: error => {
34+
setProtocolCreationError(error.response?.data.errors[0].detail ?? null)
35+
},
3336
})
3437
const {
3538
createProtocol: createProtocolRun,

0 commit comments

Comments
 (0)