From cl-weblocks-devel at common-lisp.net Tue Mar 18 18:06:52 2008 From: cl-weblocks-devel at common-lisp.net (cl-weblocks) Date: Tue, 18 Mar 2008 18:06:52 -0000 Subject: [cl-weblocks-ticket] Re: #6: Handling and reporting errors In-Reply-To: <088.3547aa88cd5cf641ec25974f0e33c997@common-lisp.net> References: <088.3547aa88cd5cf641ec25974f0e33c997@common-lisp.net> Message-ID: <097.91f0b73f9125c54054034a846ab3cd02@common-lisp.net> #6: Handling and reporting errors --------------------------+------------------------------------------------- Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: new Priority: medium | Milestone: 0.2 Component: weblocks | Version: pre-0.1 Resolution: | Keywords: error handling failure --------------------------+------------------------------------------------- Comment (by sakhmechet): Ok, the following four aspects need to be worked out: 1. A customized error page on regular requests in release mode. 2. Properly presenting errors and stack traces on AJAX requests in debug mode (instead of session timeout popup). 3. Properly presenting errors on AJAX requests in release mode (perhaps "an error occurred" popup is sufficient). 4. Dealing with true session timeout errors. The first aspect can be solved via hunchentoot's *http-error-handler*. Perhaps weblocks should provide a wrapper interface for this. The second aspect can be solved by dumping a full stack trace to the pop up box. This will involve informing the JS frontend whether we're in release or debug mode. I'm not completely sure how to do that. Perhaps include an extra debug-weblocks.js file on release mode? The third aspect pretty much works as intended today. I'm not sure if anything needs to be done here, perhaps an automatic refresh once the user hits "OK" in the JS popup? The fourth aspect (actual session timeouts) seems fairly easy to handle. Instead of signalling a simple-error (like weblocks does today in request- handler.lisp:43), it can signal a special condition (session-timeout, etc.). The default handler can simply redirect to the root URL '/', while a customized handler can take a different action (redirect to another URL, etc). What do you think? -- Ticket URL: cl-weblocks cl-weblocks