Skip to content

fix: update error handling for restore#150

Merged
jim80net merged 1 commit into
scribd:mainfrom
long-wan-ep:fix-restore-resource-not-found
Feb 11, 2023
Merged

fix: update error handling for restore#150
jim80net merged 1 commit into
scribd:mainfrom
long-wan-ep:fix-restore-resource-not-found

Conversation

@long-wan-ep

Copy link
Copy Markdown
Contributor

From my testing, farraday is raising Faraday::ResourceNotFound errors when a get by ID request can't find a resource. The current rescue RuntimeError => e block is not rescuing these errors, which leads to the failure in #148. I'm guessing faraday updated their error raising at some point which caused the existing rescue block to no longer work?

Resolves #148:

  • Update the error handling of the restore method to use Faraday::ResourceNotFound
  • Override get_by_id for dashboards to add error handling for when a dashboard ID can't be found

@jim80net

Copy link
Copy Markdown
Contributor

Fantastic, thank you for the contribution!

@jim80net jim80net merged commit 233b1b2 into scribd:main Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Error when restoring a dashboard that has been deleted in datadog

2 participants