When exercising a choice using a party that's yet to be allocated (on a ledger without implicit party allocation), we receive the error: Status(3,Party not known on ledger: Not all parties known,Vector()).
Unfortunately, the status code (3, or INVALID_ARGUMENT) is not granular enough to be able to handle the error, as there are many different kinds of invalid argument.
To automatically do something useful with this error message, the operator will need to parse the error description, looking for something resembling "Party not known on ledger" or "Not all parties known". In addition, we do not report the name of the missing party, which could potentially lead to an expensive wild goose chase.
To make this error (and other similar errors) useful, I propose we need structured error messages, containing a custom error code in addition to the general-purpose GRPC status code.
When/If it is implemented, please ping @S11001001 and @leo-da we would need to update how JSON API handles Ledger API errors and make sure the error code gets properly exposed to JSON API users.
Originally reported by @shineli-da on the forum.
When exercising a choice using a party that's yet to be allocated (on a ledger without implicit party allocation), we receive the error:
Status(3,Party not known on ledger: Not all parties known,Vector())
.Unfortunately, the status code (
3
, orINVALID_ARGUMENT
) is not granular enough to be able to handle the error, as there are many different kinds of invalid argument.To automatically do something useful with this error message, the operator will need to parse the error description, looking for something resembling "Party not known on ledger" or "Not all parties known". In addition, we do not report the name of the missing party, which could potentially lead to an expensive wild goose chase.
To make this error (and other similar errors) useful, I propose we need structured error messages, containing a custom error code in addition to the general-purpose GRPC status code.