mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-24 05:11:33 +00:00
Extend error handling in FluencePeer (#98)
This commit is contained in:
@ -140,6 +140,19 @@ export class Particle {
|
||||
}
|
||||
}
|
||||
|
||||
export type ParticleExecutionStage =
|
||||
| { stage: 'received' }
|
||||
| { stage: 'interpreted' }
|
||||
| { stage: 'interpreterError'; errorMessage: string }
|
||||
| { stage: 'localWorkDone' }
|
||||
| { stage: 'sent' }
|
||||
| { stage: 'expired' };
|
||||
|
||||
export interface ParticleQueueItem {
|
||||
particle: Particle;
|
||||
onStageChange: (state: ParticleExecutionStage) => void;
|
||||
}
|
||||
|
||||
function genUUID() {
|
||||
return uuidv4();
|
||||
}
|
||||
|
Reference in New Issue
Block a user