Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

539 B
Raw Blame
<?php

declare(strict_types=1);

namespace App\Exceptions;

use Exception;

class TokenExpiredException extends Exception
{
    public function __construct(
        string $message = 'Access token has expired or been revoked',
        public ?string $platformErrorCode = null
    ) {
        parent::__construct($message);
    }

    /**
     * @return array{platform_error_code: ?string}
     */
    public function context(): array
    {
        return [
            'platform_error_code' => $this->platformErrorCode,
        ];
    }
}