Skip to content
Snippets Groups Projects
Commit 71f8e589 authored by richard.petersen's avatar richard.petersen :sailboat:
Browse files

Do not expose error information

parent 3585eede
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ export default async function serveFilePlugin (fastify, options) {
reply.send(body)
} catch (err) {
if (isNotFoundError(err) || isVersionMismatchError(err)) throw createError(404, `File "${req.urlData('path')}" does not exist.`)
throw err
throw createError(err.statusCode || 500)
}
})
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment