When an error occurs while calling different RPC methods, the returned error code is always the same (-32000).
As a result, one must rely on the error message, which is not the best practice. To simplify the handling of related errors, it is recommended that RPC error codes be standardized.
For example, when sending payment to an expired invoice, the following error will be returned:
When an error occurs while calling different RPC methods, the returned error code is always the same (-32000).
As a result, one must rely on the error message, which is not the best practice. To simplify the handling of related errors, it is recommended that RPC error codes be standardized.
For example, when sending payment to an expired invoice, the following error will be returned:
I can only determine whether the error is due to the expired invoice by checking if the error message contains "invoice is expired."