Open GoogleCodeExporter opened 8 years ago
Actually, does $.ajaxSetup overwrite locally defined error handling functions?
If so, probably not a good solution.
In particular I was testing importing a corrupted project, but the browser
stays on the 'Starting Up' spinner. (an error is output to the log though).
Firebug reports the following:
GET
http://127.0.0.1:3333/command/core/get-project-metadata?project=2011335124043
500 Failed to find project id #2011335124043
Would some error handling added to line 126 of
/webapp/modules/core/scripts/project.js do the trick for this particular
function?
Original comment by iainsproat
on 20 Oct 2010 at 12:56
I think we should only resort to ajaxSetup's error handler when all else fails.
The get-project-metadata command should just return an error message in proper
json, e.g.,
{
"status" : "200 OK",
"code" : "/api/status/error",
"message" : [{
"message" : "Project file is corrupted and cannot be imported.",
"lang" : "en"
}]
}
All these messages need to be localized sooner or later.
Original comment by dfhu...@gmail.com
on 20 Oct 2010 at 5:09
Original issue reported on code.google.com by
iainsproat
on 20 Oct 2010 at 10:48