Skip to content
CCPEDIAby Unity Nodes
App Development

Show full error message

4 posts296 viewsLast activity Jun 2023

  1. wilsonhsu0102OP

    Hi 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..." }
    
  2. wilsonhsu0102

    Is there currently no way to do that? Is there planned work on this?

  3. rohitt

    Hi @wilsonhsu0102

    Are you able to see the complete error in the logs? It should show the complete error.

  4. wilsonhsu0102

    Even 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]..."