docs: fix fastify integration docs to avoid race conditions (#9230)

This commit is contained in:
Jonathan Samines
2026-04-17 11:51:21 -06:00
committed by GitHub
parent a844c7dd08
commit e37167aaf5

View File

@@ -60,11 +60,10 @@ fastify.route({
// Forward response to client
reply.status(response.status);
response.headers.forEach((value, key) => reply.header(key, value));
reply.send(response.body ? await response.text() : null);
return reply.send(response.body ? await response.text() : null);
} catch (error) {
fastify.log.error("Authentication Error:", error);
reply.status(500).send({
return reply.status(500).send({
error: "Internal authentication error",
code: "AUTH_FAILURE"
});