fetch-event-source icon indicating copy to clipboard operation
fetch-event-source copied to clipboard

how to stop retry when onerror?

Open blackboxo opened this issue 6 months ago • 3 comments

Keep retrying sending request if on error, how to stop retry?

blackboxo avatar Jul 02 '25 08:07 blackboxo

You need to reraise to stop the retries, see README

https://github.com/Azure/fetch-event-source/blob/a0529492576e094374602f24d5e64b3a271b4576/README.md?plain=1#L83-L91

mattalexanderhill avatar Jul 19 '25 08:07 mattalexanderhill

use the abort controller

aviadpriel avatar Aug 06 '25 19:08 aviadpriel

You can stop retry by manually throwing an error in the onerror.

Gijela avatar Sep 11 '25 09:09 Gijela