ctx.error -> ctx.throw

and new middleware signature
Merge pull request #2 from eivindfjeldstad/patch-1

ctx.error -> ctx.throw