Closed Bug 400835 Opened 16 years ago Closed 15 years ago

CalDAV provider should display errors

Categories

(Calendar :: Provider: CalDAV, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nomisvai, Assigned: browning)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8pre) Gecko/20071016 Sunbird/0.7

When a CalDAV server is in an inconsistent state and starts returning 500 errors for example, or is simply shut down, no errors are displayed informing the end-user of the problem (No errors are logged in the console either as it used to be the case in 0.5 builds I believe). This makes it very difficult to support/troubleshoot in a production environment. 

If you start sunbird while the server is down, a message is displayed but not if it comes down and sunbird is already started.

Having the possibility to see the request/response sequences logged in the console would also be a great help in troubleshooting issues. 

If you want to test this, contact me through my Oracle email and I can simulate these errors on our public server.




Reproducible: Always

Steps to Reproduce:
1.
2.
3.
OS: Windows XP → All
Hardware: PC → All
* display error dialog, go read-only for errors on add/modify/delete/refresh
* log all unexpected HTTP status codes
* better error catching/logging
* some XML-handling improvements
* new preference "calendar.debug.log.verbose" causes truly depressing amount of data to be logged
Patch also fixes a couple of other current issues (bug 429126, bug 429329) and the added logging should help get a handle on some others.
Attachment #318959 - Flags: review?(daniel.boelzle)
Comment on attachment 318959 [details] [diff] [review]
various error, logging improvements

Could you prefix the output of the LOG() calls with something that indicates the source, e.g. "CalDAV:"? This would make it easier to distinguish them from all the other logs written to console.
Assignee: nobody → browning
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
adding extra "CalDAV: " indicator to logs as requested by Stefan.
Attachment #318959 - Attachment is obsolete: true
Attachment #319372 - Flags: review?(daniel.boelzle)
Attachment #318959 - Flags: review?(daniel.boelzle)
Comment on attachment 319372 [details] [diff] [review]
prepend "CalDAV: " to LOGs

just small nits:

>-            var status = aContext.responseStatus;
>+            try {
>+                var status = aContext.responseStatus;
>+            } catch(ex) {
>+                var status = Components.interfaces.calIErrors.DAV_PUT_ERROR;
>+            }
There a couple of changes of this kind: I'd prefer to declare

var status;

then assigning to status later on.

I know declaration-on-the-fly works fine and it's a matter of personal taste, but it confuses me reading the code.

>-                    LOG("modifyItem's onOperationComplete threw an"
>+                    LOG("CalDAV: modifyItem's onOperationComplete threw an"
>                           + " exception " + ex + "; ignoring");
please align

>             if (str.substr(0,6) == "<?xml ") {
>-                str = str.substring(str.indexOf('\n'));
>+                    str = str.substring(str.indexOf('<', 2));
>             }
please align

r=dbo
Attachment #319372 - Flags: review?(daniel.boelzle) → review+
patch committed (with requested changes) on HEAD and MOZILLA_1_8_BRANCH

->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.9
Blocks: 429329
You need to log in before you can comment on or make changes to this bug.