Skip to content

GODRIVER-2603 - Revised error handling using Go 1.13 error APIs #1470

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

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

kumarlokesh
Copy link
Contributor

GODRIVER-2603

Summary

  • Used the new formatting directive %w for wrapping errors
  • Removed usage of WrappedError struct for wrapping errors
  • Used the error APIs errors.Is and errors.As for examining wrapped errors

Background & Motivation

As a requirement for the related ticket GODRIVER-2646, all errors are required to
be addressed to enable errorlint linter. Enabling the linter gave a significant
number of errors that would require revision.

From code review aspect, to keep the volume of changes in a single PR manageable,
I chose to address only a fraction of linter errors here. Would submit subsequent PR(s)
to fix all errors before errorlint linter could be enabled.

@kumarlokesh kumarlokesh requested a review from a team as a code owner November 13, 2023 20:34
@kumarlokesh kumarlokesh requested review from prestonvasquez and removed request for a team November 13, 2023 20:34
Copy link
Member

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumarlokesh Thank you for the contribution!

Copy link
Contributor

API Change Report

No changes found!

Copy link
Collaborator

@qingyang-hu qingyang-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Member

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Successfully merging this pull request may close these issues.

4 participants