onRequestAbort is useful if you need to monitor the if the client aborts the request (if the request.raw.aborted property is set to true).
The onRequestAbort hook is executed when a client closes the connection before the entire request has been received. Therefore, you will not be able to send data to the client.
Notice: client abort detection is not completely reliable. See: https://github.com/fastify/fastify/blob/main/docs/Guides/Detecting-When-Clients-Abort.md
onRequestAbortis useful if you need to monitor the if the client aborts the request (if therequest.raw.abortedproperty is set totrue). TheonRequestAborthook is executed when a client closes the connection before the entire request has been received. Therefore, you will not be able to send data to the client. Notice: client abort detection is not completely reliable. See: https://github.com/fastify/fastify/blob/main/docs/Guides/Detecting-When-Clients-Abort.md