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.

CommentFileSizeAuthor
#2 2752389-2.patch626 bytesrjacobs
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjacobs created an issue. See original summary.

rjacobs’s picture

Status: Active » Needs review
FileSize
626 bytes

This patch will allow the http response code to be available via $exception->getCode().

  • rjacobs committed 820b691 on 7.x-2.x
    Issue #2752389 by rjacobs: CrowdException should probably expose the...
rjacobs’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.