Skip to content

Document the use of async functions in hooks. #1593

@mcollina

Description

@mcollina

🐛 Bug Report

The current documentation is incorrect on how hooks works, as we state:

  • preValidation(request, reply, done): a function called after the shared preValidation hooks, useful if you need to perform authentication at route level for example, it could also be an array of functions.

We need to document that async preValidation(request, reply) is also correct, but async preValidation(request, reply, done) is not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugdocumentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions