darcs

Issue 1637 darcs should report 404 errors accordingly

Title darcs should report 404 errors accordingly
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List darcs-devel, dmitry.kurochkin, dmitry.tsygankov, jaredj, kowey, marnix
Assigned To dmitry.tsygankov
Topics HTTP, ProbablyEasy, UI

Created on 2009-10-05.12:34:10 by kowey, last changed 2010-11-21.21:02:52 by noreply.

Messages
msg8907 (view) Author: kowey Date: 2009-10-05.12:33:57
This example comes from Ian:

darcs get http://google.com/wibble
darcs failed:  Not a repository: http://google.com/wibble (Failed to download
URL http://google.com/wibble/_darcs/inventory: HTTP response code said error)

This could be better.  It could specifically says that we got a 404.
msg8908 (view) Author: kowey Date: 2009-10-05.12:47:44
More generally, it should report the actual code we got
msg8909 (view) Author: marnix Date: 2009-10-06.04:14:29
> More generally, it should report the actual code we got

...and the actual error text sent with the code, so that people won't 
have to Google for the meaning of (say) error code 402?
msg13073 (view) Author: dmitry.tsygankov Date: 2010-11-15.19:20:31
I've just submitted a patch for the issue. It employs a minor linguistic
hack, since I was trying to keep the original libcurl message intact,
but otherwise, should be OK:

$ /usr/bin/darcs --version
2.4.4 (release)
$ /usr/bin/darcs get http://google.com/wibble

darcs failed:  Not a repository: http://google.com/wibble (Failed to
download URL http://google.com/wibble/_darcs/inventory: HTTP response
code said error)
$ darcs --version
2.4.98.5 (+ 163 patches)
$ darcs get http://google.com/wibble

darcs failed:  Not a repository: http://google.com/wibble (HTTP response
code said error 404)

Note: I was expecting to find a _darcs/inventory file because I could
not find (or read) _darcs/format and assumed that the remote repository
is old-fashioned.
msg13074 (view) Author: dmitry.tsygankov Date: 2010-11-15.19:25:37
Actually, the 'Note' part of the new message is looking a bit weird, but
I didn't change it, I swear :) Not sure if it is worth filing another bug.
msg13180 (view) Author: noreply Date: 2010-11-21.21:02:51
The following patch sent by Dmitry Tsygankov <dmitry.tsygankov@gmail.com> updated issue issue1637 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1637: report HTTP response code for HTTP errors 
Ignore-this: 67fcbd9a0d3466f21a3a045672a12218
History
Date User Action Args
2009-10-05 12:34:11koweycreate
2009-10-05 12:40:37koweysetpriority: urgent -> bug
nosy: kowey, darcs-devel, jaredj, dmitry.kurochkin
2009-10-05 12:47:51koweysettopic: + HTTP
nosy: kowey, darcs-devel, jaredj, dmitry.kurochkin
messages: + msg8908
2009-10-06 04:14:32marnix.kloostersetnosy: + marnix.klooster
messages: + msg8909
2009-10-24 00:37:12adminsetnosy: + marnix, - marnix.klooster
2010-11-15 06:19:43dmitry.tsygankovsetassignedto: dmitry.tsygankov
nosy: + dmitry.tsygankov
2010-11-15 19:20:32dmitry.tsygankovsetmessages: + msg13073
2010-11-15 19:25:38dmitry.tsygankovsetmessages: + msg13074
2010-11-17 14:37:57koweysetstatus: needs-implementation -> has-patch
2010-11-21 21:02:52noreplysetstatus: has-patch -> resolved
messages: + msg13180
resolvedin: 2.8.0