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

Add ability to convert a status code into an error. #15

Closed
kelseyhightower opened this issue Aug 6, 2013 · 5 comments
Closed

Add ability to convert a status code into an error. #15

kelseyhightower opened this issue Aug 6, 2013 · 5 comments

Comments

@kelseyhightower
Copy link

As suggested by @davecheney the following could be added to the http package:

type StatusError Status

func (s *StatusError) Error() string

Which would allow us to convert a status code into an error.

@kelseyhightower
Copy link
Author

I'm interested in working on this so I've extracted the request from issue #5 to provide better visibility.

@kelseyhightower
Copy link
Author

@davecheney Can you assign this one to me?

@davecheney
Copy link
Contributor

I'm not sure I can assign to people outside the Gorilla org, ill try. But for the record, this one is all yours :)

On 07/08/2013, at 1:34, Kelsey Hightower notifications@github.com wrote:

@davecheney Can you assign this one to me?


Reply to this email directly or view it on GitHub.

@davecheney
Copy link
Contributor

Oh, it's probably already done, check client.go

On 07/08/2013, at 1:31, Kelsey Hightower notifications@github.com wrote:

As suggested by @davecheney the following could be added to the http package:

type StatusError Status

func (s *StatusError) Error() string

Which would allow us to convert a status code into an error.


Reply to this email directly or view it on GitHub.

@kelseyhightower
Copy link
Author

Yep, this was fixed in da054e3

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

No branches or pull requests

2 participants