Jun 30, 2015; 17:18
Steve Piercy - Website Builder
Lasso 9 custom error page tips and tricks
I've got a Lasso 9 custom error page, but I'd like to compare
notes with other folks.
In the webroot, I've put error.lasso with some Lasso code to
both display user friendly stuff and do logging. I also stole
ideas from Jason Huck's article on the error page for Lasso 8.
http://devblog.jasonhuck.com/2007/12/31/error-management-techniques-for-lasso/
(1) When the user requests /file-does-not-exist.lasso, I
noticed that error.lasso returns a "200 OK" response. So I went
about setting a proper response code. What other things do you
do with your error.lasso?
-------------------------------------
local(code) = error_code
// some logic to tweak #code, e.g., "401 Not authorized",
according to Lasso 9's error_code.
web_response -> setstatus(#code, 'This string does not show up
in the response headers')
-------------------------------------
(2) The above works to set the status code, but the string does
not show up in the response headers. Instead the HTTP message
corresponding to the error code always shows up. But according
to the Lasso Guide and Reference, the string should show up. Is
that a bug?
http://www.lassosoft.com/lassoDocs/languageReference/obj/web_response/setStatus
http://lassoguide.com/operations/requests-responses.html#web_response->setStatus
--steve
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy Website Builder Soquel, CA
<web@StevePiercy.com> <http://www.StevePiercy.com/>
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Jul 01, 2015; 09:37
Brad Lindsay
Re: Lasso 9 custom error page tips and tricks
Jul 01, 2015; 14:39
Steve Piercy - Website Builder
Re: Lasso 9 custom error page tips and tricks
Jul 02, 2015; 08:34
Brad Lindsay
Re: Lasso 9 custom error page tips and tricks