Engine-Twitter: set an error message when the user is not found#204
Engine-Twitter: set an error message when the user is not found#204knocte wants to merge 1 commit intomeebey:stablefrom
Conversation
Set an error message when the user is not found, otherwise the error message shown to the user as "Reason" would be the useless "Exception of type 'Twitterizer.TwitterizerException' was thrown.", when launching a command such as /timeline non-existing-username.
cb0de6a to
d26a357
Compare
|
I think this is a bug in Twitterizer that I need to fix. It should set the error message from Twitter but it doesn't, thus it fallbacks to the TypeName |
|
@meebey, look at the whole So it seems another case of ErrorMessage being null from the server. |
|
Oh yeah, that could be. But IIRC they don't return specific error codes but 200, else the HTML page would not render in browsers.... but this new mapping makes the error message of your case nicer. |
|
Actually, just debugged Twitterizer lib, and the response message is (in line 248 of TwitterCommand class): twitterResponse.Content = "{"errors":[{"message":"Sorry, that page does not exist","code":34}]}" If one were to fix Twitterizer, the message is not much better than the one I used here! |
|
Sso there is a Twitterizer bug, but even if that was fixed it would present a useless error message so the command needs to provide the message itself |
Set an error message when the user is not found, otherwise the
error message shown to the user as "Reason" would be the useless
"Exception of type 'Twitterizer.TwitterizerException' was thrown.",
when launching a command such as /timeline non-existing-username.