mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-20 05:13:42 -07:00
v2: Updates
* Simplifies & beautifies everything * Introduces a new Class system. * Errors are defaulted to AWS's handler. * New function names & more efficient handling. * Should fix a majority of the errors. Please read the README for more!
This commit is contained in:
parent
ad0726e41e
commit
e6d7753dc8
1095 changed files with 45088 additions and 2911 deletions
|
@ -3,7 +3,6 @@ namespace Aws;
|
|||
|
||||
use Aws\Api\Parser\Exception\ParserException;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Promise\FulfilledPromise;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -74,7 +73,7 @@ class WrappedHttpHandler
|
|||
$fn = $this->httpHandler;
|
||||
$options = $command['@http'] ?: [];
|
||||
$stats = [];
|
||||
if ($this->collectStats) {
|
||||
if ($this->collectStats || !empty($options['collect_stats'])) {
|
||||
$options['http_stats_receiver'] = static function (
|
||||
array $transferStats
|
||||
) use (&$stats) {
|
||||
|
@ -172,7 +171,11 @@ class WrappedHttpHandler
|
|||
$parts = ['response' => null];
|
||||
} else {
|
||||
try {
|
||||
$parts = call_user_func($this->errorParser, $err['response']);
|
||||
$parts = call_user_func(
|
||||
$this->errorParser,
|
||||
$err['response'],
|
||||
$command
|
||||
);
|
||||
$serviceError .= " {$parts['code']} ({$parts['type']}): "
|
||||
. "{$parts['message']} - " . $err['response']->getBody();
|
||||
} catch (ParserException $e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue