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

Change from returning error to HttpError #4

Open
alexellis opened this issue Jul 12, 2023 · 0 comments · May be fixed by #8
Open

Change from returning error to HttpError #4

alexellis opened this issue Jul 12, 2023 · 0 comments · May be fixed by #8

Comments

@alexellis
Copy link
Member

Change from returning error to HttpError to allow the end-user to read the Status code from the server, along with the error message we already return.

type HttpError struct {
	Err    error
	Status int
}

func (e *HttpError) Error() string {
	return e.Err.Error()
}
@nitishkumar71 nitishkumar71 linked a pull request Jul 16, 2023 that will close this issue
10 tasks
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 a pull request may close this issue.

1 participant