Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error initializing #5

Open
danipralea opened this issue Aug 5, 2019 · 2 comments
Open

error initializing #5

danipralea opened this issue Aug 5, 2019 · 2 comments

Comments

@danipralea
Copy link

Hello.
first of all, I think docs are outdated, cause APIErrorMiddleware requires an environment variable.
I tried to add the middleware:

let auth = router.grouped("auth").group(APIErrorMiddleware(environment: Environment.development))

but it fails with error Type of expression is ambiguous without more context
How can I fix this?

Thanks in advance,
Dan.

@tonyarnold
Copy link

I'm having the same issue.

@tonyarnold
Copy link

I got mine working by registering the service first in my app's configure function:

services.register(APIErrorMiddleware.self)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants