chantasaur / lightopenid

Automatically exported from code.google.com/p/lightopenid
0 stars 0 forks source link

Self-explaining error messages #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've just seen that the error messages could be improved:

"Invalid request." (line 201) - You get this message, if the host you've 
entered (e.g. http://martin-thoma.blogger.com) doesn't exist. So the message 
could be "Invalid request. Host 'http://martin-thoma.blogger.com' doesn't exist.

Original issue reported on code.google.com by themoose...@googlemail.com on 7 Apr 2011 at 9:08

GoogleCodeExporter commented 8 years ago
Ok, I'll change that. Do you have any other ideas of how to improve readability 
of the error messages? (I'll commit that once you answer)

Original comment by mewp...@gmail.com on 9 Apr 2011 at 12:19

GoogleCodeExporter commented 8 years ago
Well, I would understand these error messages better. I hope I understood the 
error messages correct:

l. 79: 'You must have either https wrappers or curl enabled.' -> 'You must have 
either https wrappers or cURL enabled. cURL is a command line tool for 
transferring files.' (what are https wrappers?)

l. 201: 'Invalid request.' -> 'Invalid request. Host 
"http://martin-thoma.blogger.com" doesn't exist.'

l. 463: 'No servers found!' -> 'No OpenID-Server found at "http://blogger.com". 
Perhaps you have misspelled your OpenID?'

l. 465: 'Endless redirection!' How can this happen?

Original comment by themoose...@googlemail.com on 11 Apr 2011 at 6:26

GoogleCodeExporter commented 8 years ago
Ad l. 79: I expect that people who don't know about something in php itself 
will search for it in the docs. For example:
http://php.net/wrappers
http://php.net/curl (also, while curl is a very useful command-line tool, it's 
also a library -- and that's how it's used in LightOpenID)

As I don't explain what is a OpenID (and some people using the library *don't* 
know that), I don't see a point in explaining every configuration detail of 
php. Especially since most default configurations already have both enabled, 
and if you have neither, you usually can't do anything about it.

Ad l. 201: Changed to "Could not connect to $url.", Although the $url can be 
any url in the path.

Ad l. 463: Will be the first sentence of your suggestion.

Ad l. 465:
If you visit a url, let's say `http://example.com/openid`, and it has a header 
"Location: /openid", then LightOpenId follows to `http://example.com/openid` 
again. This way, a cycle is created and it would cause an infinite loop. That's 
why (as Yadis specification suggests) I throw an exception after 5 redirects.

Original comment by mewp...@gmail.com on 11 Apr 2011 at 10:35

GoogleCodeExporter commented 8 years ago

Original comment by mewp...@gmail.com on 21 Apr 2011 at 7:18