<?php

namespace App\Classes\Modules\ControllerLogic\Exceptions;

use App\Classes\Exceptions\Common\ErrorException;

abstract class ServiceApiException extends ErrorException {
    /** @var int */
    private $httpStatusCode;

    public function __construct(string $message, int $httpStatusCode = 500) {
        parent::__construct($message, $httpStatusCode);
        $this->httpStatusCode = $httpStatusCode;
    }

    /**
     * @return int
     */
    public function getHttpStatusCode(): int {
        return $this->httpStatusCode;
    }
}
