Currently, we map error codes to our anchor program error codes. If another program fails, this results in an error like this:
Program namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX invoke [1]
Program log: Entrypoint
Program log: Beginning processing
Program log: Instruction unpacked
Program log: Instruction: Create
Program log: The given name account already exists.
Program log: Error: InvalidArgument
Program namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX consumed 7236 of 200000 compute units
Program namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX failed: invalid program argument
The actual error was in the name service.