Function: useMarkActivityFailed()
useMarkActivityFailed():
UseMutationResult<{success:boolean; },Error,MarkFailedInput>
Defined in: web/lib/hooks/use-activity.ts:232
Hook for marking an activity as failed.
Returns
UseMutationResult<{ success: boolean; }, Error, MarkFailedInput>
Mutation for marking activities as failed
Remarks
Call this when a PDS write fails after logging the activity.
Example
const logActivity = useLogActivity();
const markFailed = useMarkActivityFailed();
try {
await logActivity.mutateAsync({ ... });
await agent.com.atproto.repo.createRecord({ ... });
} catch (error) {
await markFailed.mutateAsync({
collection: 'pub.chive.preprint.submission',
rkey,
errorCode: 'PDS_WRITE_FAILED',
errorMessage: error.message,
});
}