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

extend errors.Is #58

Open
kamilsk opened this issue Jan 13, 2022 · 1 comment
Open

extend errors.Is #58

kamilsk opened this issue Jan 13, 2022 · 1 comment
Assignees

Comments

@kamilsk
Copy link
Member

kamilsk commented Jan 13, 2022

	if err != nil {
		switch {
		case errors.Is(err, bitbucket.ErrEventNotFound):
			fallthrough
		case errors.Is(err, bitbucket.ErrEventNotSpecifiedToParse):
			fallthrough
		case errors.Is(err, bitbucket.ErrInvalidHTTPMethod):
			fallthrough
		case errors.Is(err, bitbucket.ErrParsingPayload):
			code = http.StatusBadRequest

to

	if err != nil {
		switch {
		case errors.Is(err, bitbucket.ErrEventNotFound, bitbucket.ErrEventNotSpecifiedToParse, ...):
			code = http.StatusBadRequest
@kamilsk kamilsk added the help wanted Extra attention is needed. label Jan 13, 2022
@kamilsk kamilsk self-assigned this Jan 13, 2022
@kamilsk
Copy link
Member Author

kamilsk commented Jan 13, 2022

maybe IsOneOf

@kamilsk kamilsk added difficulty: easy and removed help wanted Extra attention is needed. labels Jan 13, 2022
@kamilsk kamilsk moved this to Backlog in 🏗 Platform May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant