Show full error message
App Development4 posts269 viewsLast activity Jun 2023
WI
wilsonhsu0102OP
Jun 2023Hi team,
I was looking for a way to stop daml from truncating the error messages returned by HTTP JSON API, but I was not able to find anything.
How do we return the full message instead of having ... at the end like
FAILED_PRECONDITION: DAML_INTERPRETATION_ERROR(9,20fbbaf4): Interpretation error: Error: Unhandled Daml exception: DA.Exception.AssertionFailed:AssertionFailed@3f4deaf1{ message = "Some long error messa..." }
WI
wilsonhsu0102
Jun 2023Is there currently no way to do that? Is there planned work on this?
RO
rohitt
Jun 2023Are you able to see the complete error in the logs? It should show the complete error.
WI
wilsonhsu0102
Jun 2023Even in my log/canton.log file it shows partial error.
For more context, I am doing the following:
assertMsg ("BAD BAD BAD" <> (show <<type Daml.Finance.Interface.Types.Common.Types.AccountKey>>) <> "BAD BAD BAD") $ False
but I only get
"errors"=>["FAILED_PRECONDITION: DAML_INTERPRETATION_ERROR(9,ff44c698): Interpretation error: Error: Unhandled Daml exception: DA.Exception.AssertionFailed:AssertionFailed@3f4deaf1{ message = \"BAD BAD BADAccountKey {[LONG MESSAGE REDACTED]..."