It's not possible to disable the error-raising behavior, but it is possible to parse data out of GlobusAPIError and its subclasses.
I believe you may want something like this:
client = GCSClient(...)
data = client.get_collection(collection_id)
except globus_sdk.GlobusAPIError as e:
if e.http_status == 404:
data = e.raw_json
Any response in the 4xx or 5xx category (e.g. 404, 500) is treated as an error. This helps us guarantee that code like
myclient = ClientClassFoo(...)
will error if the underlying API call fails.
There are also interesting implications for type annotations and response parsing from this behavior.
I notice that `raw_json` is missing from the narrative documentation for exceptions, but the documentation does have API doc covering all of the available attributes of the exception objects:
I'll see about adding an example to the narrative block at the start which uses `raw_json` to parse an error response.