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

Refactor error_source.go #1055

Closed
wants to merge 1 commit into from
Closed

Refactor error_source.go #1055

wants to merge 1 commit into from

Conversation

adamyeats
Copy link
Contributor

This PR includes a number of changes to error_source.go:

  • SourceError renamed to ErrorWithSource to be more explicit about intention. Arguments have been flipped so that err is passed in the first position to be more consistent with the other functions in the error_source package.
  • ErrorWithSource uses the functional options pattern to make it more extensible via ErrorSourceOptions, and make the bool passed as the last param optional (defaults to false). An override can be set by using calling WithOverride, e.g. ErrorWithSource(err, source, WithOverride())
  • Response renamed to ResponseWithErrorSource to be more explicit about intention

@adamyeats adamyeats force-pushed the error-source-refactor branch from b432397 to 7df585e Compare August 21, 2024 12:21
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale Issue or PR without activity label Nov 20, 2024
Copy link

github-actions bot commented Dec 4, 2024

This pull request has been automatically closed because it has not had activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot closed this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue or PR without activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant