Steve Loughran created YARN-2085:
------------------------------------

             Summary: GenericExceptionHandler can't report into TEXT/PLAIN 
responses
                 Key: YARN-2085
                 URL: https://issues.apache.org/jira/browse/YARN-2085
             Project: Hadoop YARN
          Issue Type: Sub-task
          Components: webapp
    Affects Versions: 2.4.0
            Reporter: Steve Loughran


As seen in SLIDER-51, exceptions (like NotFound) can't be mapped into 
text/plain responses. 

it may be that the {{Response.status(s).entity(exception).build()}} logic just 
doesn't work for plaintext, in which case the handler should detect an 
unsupported mime type and just return the error code with an empty body. That 
might be the best approach for other binaries too. 

or: simply catch the marshalling exception and downgrade to an empty-body 
status code. This would be a more graceful fallback, as it would catch all 
marshalling issues and return the original error code to the user



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to