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

Enhancement: standardise error handling #539

Conversation

MovieStoreGuy
Copy link
Collaborator

Context

To make the experience consistent across each the components, this will provide a standard approach as to how errors are handled from the API.

This means that if resources are removed external from terraform, it will be automatically removed from the state to avoid dealing with fractured state.

Changes

  • Adding common.OnError method to improve error responses
  • Updating existing resources to adopt method.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 67.56757% with 12 lines in your changes missing coverage. Please review.

Project coverage is 96.28%. Comparing base (e482fda) to head (252f9d8).

Files with missing lines Patch % Lines
internal/common/error.go 53.84% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
- Coverage   96.91%   96.28%   -0.63%     
==========================================
  Files          33       34       +1     
  Lines        1749     1778      +29     
==========================================
+ Hits         1695     1712      +17     
- Misses         37       49      +12     
  Partials       17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MovieStoreGuy MovieStoreGuy merged commit 180a08c into splunk-terraform:main Oct 24, 2024
7 of 8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants