This constructor should only be used by subclasses and for wrapping
other exceptions, but not for signaling internal server errors.
Throwing RestApiExceptions to signal internal server errors is bad
since all RestApiExceptions are exempt from retries and auto-tracing.
To prevent that a RestApiException is accidentally thrown to signal an
internal server error we:
* make the RestApiException(String, Exception) constructor protected so
that it can only be used by subclasses
* offer a static method for exception wrapping
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I3495cb63f66a669ac5849d5f28c3ce8cc4e5ae95