client-go icon indicating copy to clipboard operation
client-go copied to clipboard

feature request: support error type and related monitors

Open Smityz opened this issue 2 years ago • 3 comments

I would like more clear error messages

	resp, err := kvClient.Get(ctx, tableKey)
	if err != nil {
		switch err.(type) {
		case *tikvErr.pdError:
			// do something
		case *tikvErr.tikvInternalError:
			// do something
		case *tikvErr.NetworkError:
			// do something
		}
	} else {
		// ...
	}

Smityz avatar Feb 10 '23 07:02 Smityz

I am willing to take this job, is there someone willing to have a discussion with this proposal? or this proposal won't be adopted by the community?

Smityz avatar Feb 13 '23 10:02 Smityz

Do you mean to categorize errors defined in error/error.go so that downstream users know how to deal with each concrete error?

tisonkun avatar Jun 15 '23 07:06 tisonkun

Yes, I want to get more detailed error information from the error that is returned.

Smityz avatar Jun 15 '23 07:06 Smityz