Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 418253

Summary: [object Object] error from gitRepositoryExplorer
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: GitAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 4.0 RC1   
Hardware: PC   
OS: Windows 8   
Whiteboard:

Description Mark Macdonald CLA 2013-09-28 13:02:37 EDT
I got into a state where my server-side tasks were messed up (I think due to a full disk on orion.eclipse.org). This causes /tasks calls to 404.

The gitRepositoryExplorer page doesn't handle these well. For example, when the server returns back an error like this:

{
    "JsonData": {
        "taskNotFound": "8B_Kc14oABMQAcb2lWc0hw"
    },
    "HttpCode": 404,
    "Message": "Task not found: 8B_Kc14oABMQAcb2lWc0hw",
    "Severity": "Error",
    "Code": 0
}

It appears as "[object Object]" on the repo page.

The logic in GitRepositoryExplorer.prototype.handleError() needs to use the "Message" field value.
Comment 1 Mark Macdonald CLA 2013-09-30 16:19:45 EDT
Fixed the problem with gitRepositoryExplorer.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=fe89889

I found similar "[object Object]" messages from failed operations on the git-status and git-log pages -- although these were hidden by the fact that error propagation was broken, so you'd get a "Loading.." message forever.

Fixed that:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c098c5f
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=237d5e3

Finally I added a last-ditch effort to catch "[object Object]" in the status popup, and show a generic message instead reading "Unknown error occurred". This obviously provides no useful information, but it's preferable to exposing a meaningless implementation detail.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=2fdaaad