Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returning false unless success? obscures response errors and transient ones should be retried in backoff method #580

Open
ericcj opened this issue Apr 20, 2023 · 2 comments

Comments

@ericcj
Copy link
Contributor

ericcj commented Apr 20, 2023

@iloveitaly we're thinking of patching this but wanted some feedback first. actions like search and get_list use a pattern of "if success? else return false" where success is typically defined as response_hash[:status][:@is_success] == 'true' but we find transient errors in both the above methods so suspect they are 5xx that should be retried. since the response isn't returned we haven't actually captured one.

Proposal:

  • add a raise_on_failed_response option to NetSuite.configure that raises Netsuite::FailedResponseError < StandardError which includes a response accessor
  • retry these for now from backoff, ideally identify only the transient ones to retry in the future
@iloveitaly
Copy link
Member

@ericcj Thanks for the comment! I have this this on my open source todo list, but unfortunately, I'm not actively using this library in my daily work anymore. If you'd like me to prioritize this, please sponsor me and I can prioritize this more highly on my open source todo list. Thanks!

@ericcj
Copy link
Contributor Author

ericcj commented Apr 24, 2023

we'll patch it as per above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants