Hi,
There are a couple of issues I have come across recently with the
accessibility of changes made to req.chrome that developers should be
aware of. I certainly learnt a bit from analysing these problems.
Grammar issues aside, the description in #298 attempts to summarise
these potential gotchas. Perhaps we will want a page that lists these
kinds of discoveries on the wiki.
Cheers,
Gary
On 12/12/12 09:52, Apache Bloodhound wrote:
#298: Exception from missing req.chrome['labels'] in filter_stream
-----------------------+-----------------------
Reporter: gjm | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone: Release 4
Component: dashboard | Version:
Keywords: |
-----------------------+-----------------------
This is related to #294 in a sense as it is another case when the
{{{req.chrome['labels']}}} dictionary is potentially unavailable. In the
former case it was because it was causing premature lazy evaluation,
before a function was curried to specify the ultimate handler.
This new case is may be because an exception can stop the
{{{post_process_request}}} from executing so that it is not available in
the {{{filter_stream}}} method, where it is now required so that errors
are correctly whitelabelled.
I suggest that we move the whitelabelling config evaluation into a
separate helper method (in case there are situations where the dictionary
is required elsewhere) and add {{{req.chrome['labels']}}} in the
{{{filter_stream}}} method.
-- Ticket URL: <https://issues.apache.org/bloodhound/ticket/298>
Apache Bloodhound <https://issues.apache.org/bloodhound/> The Apache
Bloodhound (incubating) issue tracker