aiorest
aiorest copied to clipboard
default error_reason messages
Maybe also use constants of http.client module like: RESTError('BAD_REQUEST')
or RESTError(RESTError.BAD_REQUEST)
?
-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')
Yes, but I think current empty message is not more informative :)
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)