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

Investigate possible Http4s bug #51

Closed
gvolpe opened this issue Jan 20, 2020 · 1 comment
Closed

Investigate possible Http4s bug #51

gvolpe opened this issue Jan 20, 2020 · 1 comment

Comments

@gvolpe
Copy link
Owner

gvolpe commented Jan 20, 2020

It seems to happen when the authorization token is invalid / expired:

core 21:31:04.031 [ioapp-compute-2] ERROR org.http4s.server.service-errors - Error servicing request: POST /v1/cart from 127.0.0.1
core java.lang.ClassCastException: org.http4s.ContextRequest cannot be cast to org.http4s.AuthedRequest
core 	at cats.data.Kleisli.apply(Kleisli.scala:119)
core 	at org.http4s.server.package$AuthMiddleware$.$anonfun$apply$5(package.scala:122)
core 	at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:139)
core 	at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
core 	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:376)
core 	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:316)
core 	at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:136)
core 	at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
core 	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:376)
core 	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:316)
core 	at cats.effect.internals.IOShift$Tick.run(IOShift.scala:36)
core 	at cats.effect.internals.PoolUtils$$anon$2$$anon$3.run(PoolUtils.scala:51)
core 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
core 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
core 	at java.lang.Thread.run(Thread.java:748)
@gvolpe
Copy link
Owner Author

gvolpe commented Jan 22, 2020

Reported upstream http4s/http4s#3100

@gvolpe gvolpe closed this as completed Jan 22, 2020
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

1 participant