Re: [akka-user] MalformedRequestContentRejection - typed error messages

2016-08-28 Thread Tim Pigden
Konrad The problem I have is whatever exception I throw nothing shows up in causeOpt So it looks like there has been provision to send somethig back via causeOpt but I always get a return of None - hence I can't pattern match I had assumed from the api signatures, that throwing a typed exception

Re: [akka-user] MalformedRequestContentRejection - typed error messages

2016-08-28 Thread Konrad Malawski
Hi Tim, I'm sorry but I don't quite get what you're after here? Since you never know where your handler will be used, there is no way to have it strictly typed. The exception handler should match on the type you're expecting and then do stuff with it. HTH On Thu, Aug 18, 2016 at 5:48 PM, Tim

[akka-user] MalformedRequestContentRejection - typed error messages

2016-08-18 Thread Tim Pigden
Hi I have custom unmarshaller I handle the output with case MalformedRequestContentRejection(msg, causeOpt) ... msg is a string causeOpt is an Option[Throwable] I want to pass typed data to this rejection handler. If I could throw a typed exception somehow, I could match on causeOpt