Closed cgarciae closed 9 years ago
The API doesn't guarantees any specific execution order. If you run this code in v0.6, for example, you will get a different result, since it has a different implementation.
Thanks, will program according to this.
I have two plugins:
Catch
andPrivate
; they are both implemented around aaddRouteWrapper
. Catch catches errors and returns them as a String inside a customResp
object. Private checks for some auth parameters in the headers and verifies them in mongodb. A typical use case would beI noticed that depending on how I order the decorator tags the end result is different, more specifically, the one at the bottom is executed first. Is this accurrate or just coincidence? I'd like Private to always authenticate before the route is executed and Catch to catch errors after the route is executed.