GitHub user ahgittin opened a pull request:

    https://github.com/apache/brooklyn-client/pull/40

    Brooklyn REST API convenience has better error propagation

    Previously the convenience `getEntity` method masked errors the way some 
clients used it.  Clarify method to fail on the most obvious errors (instead of 
returning a totally useless object of the type requested), and introduce a 
better method.
    
    Related to  https://github.com/apache/brooklyn-server/pull/571 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ahgittin/brooklyn-client 
brooklyn-api-convenience-better-error-propagation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-client/pull/40.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #40
    
----
commit 94d2ff04277f08f1080ab219e4b61937fdb5a7d8
Author: Alex Heneveld <[email protected]>
Date:   2017-02-22T15:08:34Z

    lets BrooklynApi.getEntity understand some errors, and add better method
    
    getEntityOnSuccess which requires a success code from the server.
    
    triggered by observing downstream usages which use getEntity on results
    without checking them, and thus have an empty TaskSummary following a 
severe server error
    (the server error is lost and the code typically fails later with no 
indication of cause)
    
    also tidy deprecations/warnings, toString

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to