solana-py icon indicating copy to clipboard operation
solana-py copied to clipboard

Feature Request: allow customized error handling

Open Abdelgha-4 opened this issue 11 months ago • 1 comments

The actual exception handing has two limitation:

  • The actual exception object is inaccessible
  • The current handle_exceptions decorators does not allow for custom error handling strategy

Ideally SolanaExceptionBase should store the inner exception object if the user code needs to handle it in a specific way, (examples: change the proxy on proxy errors, retry on connection errors, wait on rate limits etc...)

Also since the handle_exceptions decorators catch all occurring exceptions it'd be nice if you could specify the error handling logic there, it'd provide a centralized place for shared exception handling logic across all the methods.

Thank you

Abdelgha-4 avatar Jan 15 '25 20:01 Abdelgha-4

Happy to accept a PR

michaelhly avatar Feb 08 '25 23:02 michaelhly