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

Errors in pkg/* do not comply with GSP-47 & GSP-51 #575

Closed
xxchan opened this issue May 13, 2021 · 1 comment
Closed

Errors in pkg/* do not comply with GSP-47 & GSP-51 #575

xxchan opened this issue May 13, 2021 · 1 comment
Labels
bug Something isn't working good first issue Issue template help wanted

Comments

@xxchan
Copy link
Contributor

xxchan commented May 13, 2021

They will become ErrUnexpected. (What should they become?)

e.g., qingstor:

func newServicer(pairs ...typ.Pair) (srv *Service, err error) {
	defer func() {
		if err != nil {
			err = services.InitError{Op: "new_servicer", Type: Type, Err: formatError(err), Pairs: pairs}
		}
	}()
	
	//...

	cp, err := credential.Parse(opt.Credential)
	if err != nil {
		// credential.Error here
		return nil, err
	}

	//...

	if opt.HasEndpoint {
		ep, err := endpoint.Parse(opt.Endpoint)
		if err != nil {
			// endpoint.Error here
			return nil, err
		}
	
	//...
}
@Xuanwo
Copy link
Contributor

Xuanwo commented May 13, 2021

Maybe they should implement IsAosError either?

@Xuanwo Xuanwo added the bug Something isn't working label May 13, 2021
@Xuanwo Xuanwo changed the title Errors in pkg/* do not comply with AOS-47 & AOS-51 Errors in pkg/* do not comply with GSP-47 & GSP-51 Jun 8, 2021
@Xuanwo Xuanwo closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Issue template help wanted
Projects
None yet
Development

No branches or pull requests

2 participants