The REST connection class typically throws a CrowdException whenever a full response cannot be returned. As of the resolution to #2713967: User and group create/update methods should throw exceptions instead of returning false this exception is thrown pretty much whenever anything goes wrong (connection down, confirmed but unsuccessful result, etc.), which I think is well justified. However, it might still be useful to expose the exact error code to the caller for any cases where more precise error handling must take place for distinct kinds of errors. Currently all the response details of the exception are locked-up in protected properties, so this is not possible.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2752389-2.patch | 626 bytes | rjacobs |
|
Comments
Comment #2
rjacobs CreditAttribution: rjacobs at Center for Research Libraries commentedThis patch will allow the http response code to be available via $exception->getCode().
Comment #4
rjacobs CreditAttribution: rjacobs at Center for Research Libraries commentedCommitted.