for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Signifly\Shopify\Exceptions;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Arr;
class Handler implements ErrorHandlerInterface
{
public function handle(Response $response)
if ($response->successful()) {
return;
}
if ($response->status() === 429) {
throw new TooManyRequestsException($response);
if ($response->status() === 422) {
throw new ValidationException(Arr::wrap($response->json('errors', [])));
if ($response->status() === 404) {
throw new NotFoundException();
$response->throw();