You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2024. It is now read-only.
When signing transaction using --offline flag, if there is any error, the real error message is replaced by an incorrect and misleading error:
Application at data path <data-path> is not running.
This makes no sense, because a running node is not needed for offline signing. Even worse, this misleading error makes it very difficult for a user to understand what the real error is.
Expected behavior
Command should return the correct error, which will help the user correct the command input.
Steps to reproduce
While a node is not running, sign transaction offline and provide an invalid value for a flag, e.g. key derivation path:
In this case, the expected error is that key derivation path is invalid.
Which version(s) does this affect? (Environment, OS, etc...)
The latest SDK 6.0 version.
How to fix it
The transaction:sign command contains custom logic which re-throws a custom error if application is not running:
if(error){if(this._dataPath&&!isApplicationRunning(this._dataPath)){thrownewError(`Application at data path ${this._dataPath} is not running.`);}this.error(errorinstanceofError ? error.message : error);}
This does not correctly cover the case when signing is done in offline mode. Furthermore, this custom logic is not even needed. The check if the application is running is already correctly done when getting the API client, and that function throws the correct error:
Since the concept of a "path" could mean different things, it would be nice to make the invalid key derivation path error message more specific by changing it from Invalid path format into Invalid key derivation path format.
The text was updated successfully, but these errors were encountered:
Actual behavior
When signing transaction using
--offline
flag, if there is any error, the real error message is replaced by an incorrect and misleading error:This makes no sense, because a running node is not needed for offline signing. Even worse, this misleading error makes it very difficult for a user to understand what the real error is.
Expected behavior
Command should return the correct error, which will help the user correct the command input.
Steps to reproduce
While a node is not running, sign transaction offline and provide an invalid value for a flag, e.g. key derivation path:
In this case, the expected error is that key derivation path is invalid.
Which version(s) does this affect? (Environment, OS, etc...)
The latest SDK 6.0 version.
How to fix it
The
transaction:sign
command contains custom logic which re-throws a custom error if application is not running:This does not correctly cover the case when signing is done in offline mode. Furthermore, this custom logic is not even needed. The check if the application is running is already correctly done when getting the API client, and that function throws the correct error:
Additional request
Since the concept of a "path" could mean different things, it would be nice to make the invalid key derivation path error message more specific by changing it from
Invalid path format
intoInvalid key derivation path format
.The text was updated successfully, but these errors were encountered: