Introduced common exception superclass

This commit is contained in:
lukas committed 2026-10-15 13:39:44 +00:00
1 parent f749d4a05e
commit afafb1ac3d
12 files changed
+48 -28

No files matched your search

+3 -2
View File
@@ -14,7 +14,8 @@ use GuzzleHttp\Client, GuzzleHttp\HandlerStack, GuzzleHttp\Middleware;
use Psr\Http\Message\RequestInterface;
use CloudObjects\SDK\COIDParser, CloudObjects\SDK\ObjectRetriever;
use CloudObjects\SDK\Exceptions\InvalidObjectConfigurationException,
CloudObjects\SDK\Exceptions\CoreAPIException;
CloudObjects\SDK\Exceptions\CoreAPIException,
CloudObjects\SDK\Exceptions\SDKException;
/**
* The APIClientFactory can be used to create a preconfigured Guzzle HTTP API client
@@ -205,7 +206,7 @@ class APIClientFactory {
if ($this->reader->hasType($api, 'wa:GraphQLEndpoint')) {
if (!class_exists('GraphQL\Client'))
throw new Exception("Install the gmostafa/php-graphql-client package to retrieve a specific client for wa:GraphQLEndpoint objects.");
throw new SDKException("Install the gmostafa/php-graphql-client package to retrieve a specific client for wa:GraphQLEndpoint objects.");
return new \GraphQL\Client($clientConfig['base_uri'],
isset($clientConfig['headers']) ? $clientConfig['headers'] : []);