diff --git a/src/AnimeClient/API/Kitsu/Model.php b/src/AnimeClient/API/Kitsu/Model.php index b5fa5581..af852d3a 100644 --- a/src/AnimeClient/API/Kitsu/Model.php +++ b/src/AnimeClient/API/Kitsu/Model.php @@ -48,7 +48,7 @@ final class Model { use MangaTrait; use MutationTrait; - protected const LIST_PAGE_SIZE = 100; + protected const LIST_PAGE_SIZE = 75; /** * @var ListItem @@ -367,7 +367,7 @@ final class Model { 'kind' => $type, ], 'include' => "{$type},{$type}.mappings", - 'sort' => '-updated_at' + // 'sort' => '-updated_at' ]; return $this->getRawSyncList($type, $options); diff --git a/src/AnimeClient/API/Kitsu/RequestBuilder.php b/src/AnimeClient/API/Kitsu/RequestBuilder.php index b15adc2c..51516c0c 100644 --- a/src/AnimeClient/API/Kitsu/RequestBuilder.php +++ b/src/AnimeClient/API/Kitsu/RequestBuilder.php @@ -363,15 +363,18 @@ final class RequestBuilder extends APIRequestBuilder { // Any other type of failed request if ($statusCode > 299 || $statusCode < 200) { - if ($logger) - { - $logger->warning('Non 2xx response for api call', (array)$response); - } -dump($rawBody); -die(); - // throw new FailedResponseException('Failed to get the proper response from the API'); + $logger->warning('Non 2xx response for api call', (array)$response); } - return Json::decode($rawBody); + try + { + return Json::decode($rawBody); + } + catch (JsonException $e) + { + // dump($e); + dump($rawBody); + die(); + } } } \ No newline at end of file diff --git a/src/AnimeClient/Command/BaseCommand.php b/src/AnimeClient/Command/BaseCommand.php index c1670d99..1ba61d1d 100644 --- a/src/AnimeClient/Command/BaseCommand.php +++ b/src/AnimeClient/Command/BaseCommand.php @@ -54,22 +54,15 @@ abstract class BaseCommand extends Command { $message = implode("\n", $message); } - try - { - // color message - $message = Colors::colorize($message, $fgColor, $bgColor); + // color message + $message = Colors::colorize($message, $fgColor, $bgColor); - // create the box - $box = new Box($this->getConsole(), $message); + // create the box + $box = new Box($this->getConsole(), $message); - $box->write(); + $box->write(); - echo "\n"; - } - catch (ConsoleException $e) - { - // oops - } + echo "\n"; } public function echo(string $message): void