see 
https://turbogears.readthedocs.io/en/latest/reference/classes.html#tg.controllers.util.abort
I suggest you to use detail with gettext:
```
from tg import expose, abort
from tg.i18n import ugettext as _
@expose('templates...blah.blah')
def test(self):
    return abort(401, detail=_('pretty message'))
```
take a look also at your controllers/error.py error controller

Il giorno mercoledì 5 febbraio 2020 08:22:08 UTC+1, Vipul Ved Prakash ha 
scritto:
>
> I'd like to return 401 from a controller.  How does one do this? 
>
> best, 
> vipul
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/turbogears/34773a49-e2d4-49f0-8616-3a8bda9f8f9a%40googlegroups.com.

Reply via email to