Next.js Discord

Discord Forum

Abort server actions manually?

Answered
Saltwater Crocodile posted this in #help-forum
Open in Discord
Saltwater CrocodileOP
Looking to do my fetch requests on the server side w/ server actions. On the client you can use the AbortController, so wondering what the equivalent is for app router.
Answered by fuma
No, you can’t abort a server action, try creating a route handler and use fetch in the client side instead.
View full answer

2 Replies

No, you can’t abort a server action, try creating a route handler and use fetch in the client side instead.
Answer
Saltwater CrocodileOP
Oh I see, thank you!