Idea: warn users when trying to use TextResponse functionality with plain Response #2264
Currently, if we try to use TextResponse functionality like response.text or css()/xpath() methods with a plain Response (e.g. in case of binary content), we get an AttributeError:
Would it make sense to add a few methods/properties to explain what's going on for new users?
I was thinking instead of AttributeError, a better behavior could be a ValueError with a message giving a bit more context.
So, in plain
This would be nice, because we'd had to explain fewer things when teaching people about responses and also about using
What do you think?
The text was updated successfully, but these errors were encountered: