Re: Abridged summary of pecan-dev@googlegroups.com - 1 update in 1 topic

10 views
Skip to first unread message

Ryan Petrello

unread,
Jun 27, 2014, 2:19:39 PM6/27/14
to peca...@googlegroups.com
Michał,

WebOb's `HTTPException` (which `pecan.abort` uses) allows you to specify
a `detail` argument, which will be appended to the HTML error message generated
by webob. Here's an example:

http://screens.objects.dreamhost.com/06-27-2014-14-17-09.png

If you'd like more control over your application's HTML error messages, take
a look at the Pecan documentation on custom error pages
(http://pecan.readthedocs.org/en/latest/errors.html).

On 06/27/14 05:45:08 PM, peca...@googlegroups.com wrote:
> =============================================================================
> Today's topic summary
> =============================================================================
>
> Group: peca...@googlegroups.com
> Url: http://groups.google.com/group/pecan-dev/topics
>
> - How to present user with custom error message from abort? [1 Update]
> http://groups.google.com/group/pecan-dev/t/9df45876243b89f7
>
>
> =============================================================================
> Topic: How to present user with custom error message from abort?
> Url: http://groups.google.com/group/pecan-dev/t/9df45876243b89f7
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: "Michał Dulko" <michal...@gmail.com>
> Date: Jun 27 07:32AM -0700
> Url: http://groups.google.com/group/pecan-dev/msg/28e2ccd246e9a9f8
>
> Hello!
>
> I'm trying to use abort(500, 'My message.') to signal an error to API user.
> How can I present 'My message' to the user? When I create config.py I'm
> unable to pass message to the error
>
>
>

--
Ryan Petrello
Senior Developer, DreamHost
ryan.p...@dreamhost.com
Reply all
Reply to author
Forward
0 new messages