disneystreaming / smithy4s

https://disneystreaming.github.io/smithy4s/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a default implementation for `getMessage` in `Smithy4sThrowable` 

Baccata opened this issue · comments

Some users are getting confused because of libraries that print getMessage, which currently returns null for smithy4s-generated throwables, except if one of the fields is identified to be a message field.

The PR that introduced this. I guess we can do something smart. The reason I implemented toString instead of getMessage was that the default toString calls getMessage and so if the former is not overridden, the output error message was awkward.

Maybe implementing both would work as expected.

Maybe implementing both would work as expected.

That is indeed what I think we should do.