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
We should consider reworking how transaction kernel errors are structured on a category level. Category here means account, prologue, epilogue, faucet, ... These errors are already grouped in tx_kernel_errors.rs:
Here they are grouped by the category in the name but the error code does not reflect the categories.
How should it be done?
It would be nice to be able to programmatically determine the category of an error from the error code, similar to how one can determine from an HTTP status code (1xx, 2xx, 3xx, ...) the category (Informational, Success, Redirect, ...).
For that, we might want to come up with ranges for categories, for example:
ERR_ACCOUNT_* might be within 0x00020040 - 0x00020050
ERR_FUNGIBLE_ASSET_* within 0x00020050 - 0x00020060
and so on...
The task is to figure out what range size makes sense and then rewrite the error codes to be within those categories.
When is this task done?
When the errors can be categorized from their code.
What should be done?
We should consider reworking how transaction kernel errors are structured on a category level. Category here means account, prologue, epilogue, faucet, ... These errors are already grouped in
tx_kernel_errors.rs
:Here they are grouped by the category in the name but the error code does not reflect the categories.
How should it be done?
It would be nice to be able to programmatically determine the category of an error from the error code, similar to how one can determine from an HTTP status code (1xx, 2xx, 3xx, ...) the category (Informational, Success, Redirect, ...).
For that, we might want to come up with ranges for categories, for example:
ERR_ACCOUNT_*
might be within0x00020040 - 0x00020050
ERR_FUNGIBLE_ASSET_*
within0x00020050 - 0x00020060
The task is to figure out what range size makes sense and then rewrite the error codes to be within those categories.
When is this task done?
When the errors can be categorized from their code.
Additional context
For reference, the original context where this came up.
The text was updated successfully, but these errors were encountered: