Dispatch `RETRYING` SSE event (#585)
This commit is contained in:
parent
437f8bcf53
commit
552c55939d
|
@ -14,6 +14,7 @@ import {
|
|||
type DatastarSSEEvent,
|
||||
ERROR,
|
||||
FINISHED,
|
||||
RETRYING,
|
||||
STARTED,
|
||||
} from '../shared'
|
||||
|
||||
|
@ -152,6 +153,7 @@ export const sse = async (
|
|||
// do nothing and it will retry
|
||||
if (error) {
|
||||
console.error(error.message)
|
||||
dispatchSSE(RETRYING, { message: error.message })
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ export const SWAPPING_CLASS = `${DATASTAR}-swapping`
|
|||
export const STARTED = 'started'
|
||||
export const FINISHED = 'finished'
|
||||
export const ERROR = 'error'
|
||||
export const RETRYING = 'retrying'
|
||||
|
||||
export interface DatastarSSEEvent {
|
||||
type: string
|
||||
|
|
Loading…
Reference in New Issue