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

Error Type Vagueness #16

Open
RGood opened this issue Apr 18, 2021 · 2 comments
Open

Error Type Vagueness #16

RGood opened this issue Apr 18, 2021 · 2 comments

Comments

@RGood
Copy link

RGood commented Apr 18, 2021

Currently go-reddit uses the default error type in Go, which is just an interface with a string attribute. It would be helpful to create a custom error type that included more specific information such as response code or the specific ENUM error type.

@vartanbeno
Copy link
Owner

Hello! Thank you for opening this issue. Can you please provide an example? Some of the error types (here) contain an *http.Response instance which can be inspected if an error is returned.

@RGood
Copy link
Author

RGood commented Apr 22, 2021

The example / use-case I'm thinking of pertains to the client.Message.Send method, which just returns a generic error object, as far as I can tell

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