Yep thanks, I have created a ticket for the same. A good way of achieving
this helps with better error handling.

On Wed, Jul 15, 2015 at 8:02 PM, Anthony <[email protected]> wrote:

> There isn't an easy way to do it, so go ahead and open a ticket, but I
> think you can do it by creating a custom error handler
> <http://web2py.com/books/default/chapter/29/04/the-core#Routes-on-error>
> (though will fail in case the error handler itself fails) or via external
> WSGI middleware
> <http://web2py.com/books/default/chapter/29/04/the-core#External-middleware>
> .
>
> Anthony
>
> On Wednesday, July 15, 2015 at 4:58:42 AM UTC-4, Massimo Di Pierro wrote:
>>
>> Good point. Please open a ticket. There is no way to do this now.
>>
>> On Wednesday, 15 July 2015 01:52:55 UTC-5, Saifuddin Rangwala wrote:
>>>
>>> Hi,
>>>
>>>         I would like to a custom http header "X-APP-VERSION" alongwith
>>> all the web2py responses.
>>>
>>> For 200 OK I do it using code below in the models file:
>>>
>>> response.headers["X-APP-VERSION"] = config.version
>>>
>>> However, I would like to send this header for all error cases as well
>>> including the unexpected errors like 500 Internal Server Error.
>>>
>>> Is there a good way to accomplish this?
>>>
>>>
>>> --
>>> Thanks,
>>> -Saif.
>>>
>>


--
-Saif.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to