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

default error_reason messages #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

default error_reason messages #24

wants to merge 1 commit into from

Conversation

imbolc
Copy link

@imbolc imbolc commented Aug 20, 2014

Maybe also use constants of http.client module like: RESTError('BAD_REQUEST') or RESTError(RESTError.BAD_REQUEST)?

@popravich
Copy link
Contributor

-1 for this.

error_reason message is not neccessarily the same as http response status reason.
RESTError message parameter is there to be able to give more application/context specific error description (eg: RESTError(400, "required parameter 'user_id' is missing")).
(aiohttp internally will set response status reason to 'Bad Request')

@imbolc
Copy link
Author

imbolc commented Sep 8, 2014

Yes, but I think current empty message is not more informative :)

@popravich
Copy link
Contributor

Yeap, but that's the problem of a developer raising RESTError without message.
I don't think that doubling the same message makes it more informative)

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 this pull request may close these issues.

2 participants